Trace Call Tree - npmean.trace

C:\Users\Prakash\Documents\jobsearch\grimoire\experiments\python\npmean.trace
File events: 223156 | Nodes: 39564 | Max depth: 13
debugnpmean.py (1)
L1 import numpy as np (1)
<frozen importlib._bootstrap> (1)
L1354 (102)
L1355 (102)
L1357 (204)
L413 (102)
L414 (102)
L417 (102)
L432 (376)
L433 (376)
L434 (376)
L435 (376)
L436 (101)
L437 (101)
L439 (376)
L440 (101)
L443 (101)
L253 (101)
L254 (101)
L257 (101)
L261 (101)
L272 (101)
L286 (101)
L445 (101)
L456 (101)
L458 (376)
L460 (376)
L418 (102)
L310 (376)
L311 (752)
L159 (376)
L160 (376)
L170 (376)
L125 (376)
L126 (376)
L127 (376)
L128 (376)
L129 (376)
L130 (376)
L132 (376)
L75 (376)
L76 (376)
L77 (376)
L80 (376)
L133 (376)
L171 (376)
L312 (376)
L316 (752)
L317 (376)
L324 (376)
L325 (376)
L326 (376)
L175 (376)
L86 (376)
L87 (376)
L88 (376)
L91 (376)
L1358 (102)
L1359 (102)
L1360 (102)
L1305 (102)
L1306 (102)
L1307 (102)
L1308 (102)
L1322 (101)
L1242 (101)
L1243 (101)
L1248 (101)
L1254 (101)
L1255 (397)
L1256 (792)
L1224 (396)
L1257 (396)
L1258 (396)
L1262 (396)
__init__.py (101)
L104 if path is not None and not fullname.startswith('test.'): (101)
L107 method_name = 'spec_for_{fullname}'.format(**locals()) (15)
L108 method = getattr(self, method_name, lambda: None) (30)
L109 return method() (15)
L105 return None (86)
<frozen importlib._bootstrap_external> (97)
L1558 (97)
L1559 (11)
L1560 (97)
L1528 (97)
L1529 (97)
L1530 (97)
L1532 (97)
L1509 (97)
L1510 (11)
L1511 (11)
L1516 (97)
L1517 (97)
L1521 (97)
L1533 (97)
L1534 (97)
L1630 (97)
L1631 (97)
L1632 (97)
L1633 (97)
L152 (131)
<frozen zipimport> (8)
L90 (8)
L92 (8)
L1636 (97)
L1640 (97)
L69 (97)
L1644 (97)
L1645 (97)
L1647 (97)
L1659 (91)
L1660 (91)
L1661 (91)
L103 (115)
L105 (115)
L107 (115)
L108 (115)
L109 (345)
L110 (230)
L111 (115)
L112 (115)
L113 (115)
L122 (115)
L123 (115)
L124 (345)
L125 (115)
L128 (115)
L1664 (91)
L1518 (8)
L1519 (8)
L1491 (8)
L1493 (16)
L1494 (16)
L1495 (16)
<frozen zipimport> (8)
L69 (8)
L71 (8)
L73 (8)
L74 (8)
L76 (8)
L77 (8)
L78 (8)
L79 (8)
L1496 (8)
L1497 (8)
L1719 (8)
L171 (8)
L173 (8)
L157 (26)
L158 (26)
L161 (14)
L1721 (8)
L1603 (8)
L1604 (32)
L1605 (88)
L1606 (8)
L1608 (8)
L1611 (8)
L192 (14)
L179 (14)
L181 (14)
L182 (14)
L197 (14)
L1612 (8)
L1613 (8)
L1614 (8)
L1520 (8)
L1637 (8)
L1678 (8)
L1679 (8)
L1680 (8)
L1687 (8)
L1695 (8)
L1696 (234)
L1697 (226)
L1698 (226)
L1701 (36)
L1702 (226)
L1699 (190)
L1703 (8)
L1704 (8)
L1705 (234)
L1638 (8)
L1648 (6)
L1649 (18)
L1650 (18)
L1651 (18)
L1652 (18)
L166 (18)
L159 (12)
L160 (12)
L1653 (6)
L1621 (6)
L1188 (6)
L1189 (6)
L1622 (12)
L1623 (6)
L846 (6)
L858 (6)
L859 (6)
L860 (6)
L870 (6)
L1228 (396)
L1263 (396)
L984 (101)
L987 (97)
L1130 (97)
L488 (248)
__init__.py (8)
L1 """ (8)
L91 def _delvewheel_patch_1_10_0(): (1)
L97 _delvewheel_patch_1_10_0() (1)
L92 import os (1)
L93 if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'numpy.libs'))): (1)
<frozen ntpath> (1)
L263 (1)
L227 (1)
L228 (1)
L35 (1)
L38 (1)
L229 (1)
L231 (1)
L232 (12)
L233 (11)
L234 (1)
L235 (1)
L100 (1)
L101 (1)
L106 (1)
L107 (1)
L108 (1)
L109 (1)
L110 (1)
L111 (3)
L112 (2)
L113 (2)
L120 (2)
L130 (2)
L131 (2)
L132 (2)
L134 (1)
L137 (1)
L575 (1)
L576 (1)
L94 os.add_dll_directory(libs_dir) (1)
<frozen os> (1)
L1164 (1)
L1165 (1)
L1166 (2)
L1167 (1)
L1168 (1)
L1169 (1)
L1139 (1)
L1140 (1)
L1141 (1)
L98 del _delvewheel_patch_1_10_0 (1)
L101 import os (1)
L102 import sys (1)
L103 import warnings (1)
L105 from ._globals import _NoValue, _CopyMode (1)
L11 import functools (2)
L12 import warnings (1)
L13 from ._convertions import asunicode, asbytes (2)
L9 import os (1)
L16 env_added = [] (1)
L17 for envkey in ['OPENBLAS_MAIN_FREE', 'GOTOBLAS_MAIN_FREE']: (3)
L18 if envkey not in os.environ: (2)
<frozen _collections_abc> (2)
L816 (2)
L817 (2)
<frozen os> (2)
L713 (2)
L714 (2)
L787 (2)
L781 (2)
L783 (2)
L715 (2)
L717 (2)
L818 (2)
L819 (2)
L19 os.environ[envkey] = '1' (2)
<frozen os> (2)
L721 (2)
L787 (2)
L781 (4)
L783 (4)
L722 (2)
L723 (2)
L724 (2)
L20 env_added.append(envkey) (2)
L22 try: (1)
L23 from . import multiarray (1)
L3 import os as _os, sys as _sys (2)
L4 import types as _types (2)
L6 __version__ = "1.1.0" (1)
L8 from _ctypes import Union, Structure, Array (1)
L87 from . import linalg # deprecated in NumPy 2.0 (1)
_globals.py (1)
L1 """ (1)
L18 import enum (1)
L20 from ._utils import set_module as _set_module (1)
_convertions.py (1)
L1 """ (1)
L6 __all__ = ["asunicode", "asbytes"] (1)
L9 def asunicode(s): (1)
L15 def asbytes(s): (1)
_expired_attrs_2_0.py (1)
L1 """ (1)
L6 __expired_attributes__ = { (53)
L7 "geterrobj": "Use the np.errstate context manager instead.", (1)
L8 "seterrobj": "Use the np.errstate context manager instead.", (1)
L9 "cast": "Use `np.asarray(arr, dtype=dtype)` instead.", (1)
L10 "source": "Use `inspect.getsource` instead.", (1)
L11 "lookfor": "Search NumPy's documentation directly.", (1)
L12 "who": "Use an IDE variable explorer or `locals()` instead.", (1)
L13 "fastCopyAndTranspose": "Use `arr.T.copy()` instead.", (1)
L14 "set_numeric_ops": (1)
L15 "For the general case, use `PyUFunc_ReplaceLoopBySignature`. " (1)
L18 "NINF": "Use `-np.inf` instead.", (1)
L19 "PINF": "Use `np.inf` instead.", (1)
L20 "NZERO": "Use `-0.0` instead.", (1)
L21 "PZERO": "Use `0.0` instead.", (1)
L22 "add_newdoc": (1)
L23 "It's still available as `np.lib.add_newdoc`.", (1)
L24 "add_docstring": (1)
L25 "It's still available as `np.lib.add_docstring`.", (1)
L26 "add_newdoc_ufunc": (1)
L27 "It's an internal function and doesn't have a replacement.", (1)
L28 "compat": "There's no replacement, as Python 2 is no longer supported.", (1)
L29 "safe_eval": "Use `ast.literal_eval` instead.", (1)
L30 "float_": "Use `np.float64` instead.", (1)
L31 "complex_": "Use `np.complex128` instead.", (1)
L32 "longfloat": "Use `np.longdouble` instead.", (1)
L33 "singlecomplex": "Use `np.complex64` instead.", (1)
L34 "cfloat": "Use `np.complex128` instead.", (1)
L35 "longcomplex": "Use `np.clongdouble` instead.", (1)
L36 "clongfloat": "Use `np.clongdouble` instead.", (1)
L37 "string_": "Use `np.bytes_` instead.", (1)
L38 "unicode_": "Use `np.str_` instead.", (1)
L39 "Inf": "Use `np.inf` instead.", (1)
L40 "Infinity": "Use `np.inf` instead.", (1)
L41 "NaN": "Use `np.nan` instead.", (1)
L42 "infty": "Use `np.inf` instead.", (1)
L43 "issctype": "Use `issubclass(rep, np.generic)` instead.", (1)
L44 "maximum_sctype": (1)
L45 "Use a specific dtype instead. You should avoid relying " (1)
L48 "obj2sctype": "Use `np.dtype(obj).type` instead.", (1)
L49 "sctype2char": "Use `np.dtype(obj).char` instead.", (1)
L50 "sctypes": "Access dtypes explicitly instead.", (1)
L51 "issubsctype": "Use `np.issubdtype` instead.", (1)
L52 "set_string_function": (1)
L53 "Use `np.set_printoptions` instead with a formatter for " (1)
L55 "asfarray": "Use `np.asarray` with a proper dtype instead.", (1)
L56 "issubclass_": "Use `issubclass` builtin instead.", (1)
L57 "tracemalloc_domain": "It's now available from `np.lib`.", (1)
L58 "mat": "Use `np.asmatrix` instead.", (1)
L59 "recfromcsv": "Use `np.genfromtxt` with comma delimiter instead.", (1)
L60 "recfromtxt": "Use `np.genfromtxt` instead.", (1)
L61 "deprecate": "Emit `DeprecationWarning` with `warnings.warn` directly, " (1)
L63 "deprecate_with_doc": "Emit `DeprecationWarning` with `warnings.warn` " (1)
L65 "disp": "Use your own printing function instead.", (1)
L66 "find_common_type": (1)
L67 "Use `numpy.promote_types` or `numpy.result_type` instead. " (1)
L70 "round_": "Use `np.round` instead.", (1)
L71 "get_array_wrap": "", (1)
L72 "DataSource": "It's still available as `np.lib.npyio.DataSource`.", (1)
L73 "nbytes": "Use `np.dtype(<dtype>).itemsize` instead.", (1)
L74 "byte_bounds": "Now it's available under `np.lib.array_utils.byte_bounds`", (1)
L76 "It's still available as `np.char.compare_chararrays`.", (1)
L77 "format_parser": "It's still available as `np.rec.format_parser`.", (1)
L78 "alltrue": "Use `np.all` instead.", (1)
L79 "sometrue": "Use `np.any` instead.", (1)
version.py (1)
L2 """ (1)
L5 version = "2.2.3" (1)
L6 __version__ = version (1)
L7 full_version = version (1)
L9 git_revision = "a27456108104ac11e8564c2f18710997f3a55eb9" (1)
L10 release = 'dev' not in version and '+' not in version (1)
L11 short_version = version.split("+")[0] (1)
_distributor_init.py (1)
L1 """ Distributor init file (1)
L12 try: (1)
L13 from . import _distributor_init_local (1)
__config__.py (1)
L3 from enum import Enum (1)
L4 from numpy._core._multiarray_umath import ( (1)
multiarray.py (1)
L1 """ (1)
L9 import functools (1)
L10 from . import overrides (1)
overrides.py (1)
L1 """Implementation of __array_function__ overrides from NEP-18.""" (1)
L2 import collections (1)
L3 import functools (1)
L5 from .._utils import set_module (1)
_inspect.py (1)
L1 """Subset of inspect module from upstream python (1)
L8 import types (1)
L10 __all__ = ['getargspec', 'formatargspec'] (1)
L13 def ismethod(object): (1)
L26 def isfunction(object): (1)
L41 def iscode(object): (1)
L63 CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS = 1, 2, 4, 8 (1)
L65 def getargs(co): (1)
L96 def getargspec(func): (1)
L113 def getargvalues(frame): (1)
L125 def joinseq(seq): (1)
L131 def strseq(object, convert, join=joinseq): (1)
L140 def formatargspec(args, varargs=None, varkw=None, defaults=None, (2)
L141 formatarg=str, (1)
L142 formatvarargs=lambda name: '*' + name, (1)
L143 formatvarkw=lambda name: '**' + name, (1)
L144 formatvalue=lambda value: '=' + repr(value), (1)
L145 join=joinseq): (1)
L169 formatarg=str, (1)
L170 formatvarargs=lambda name: '*' + name, (1)
L171 formatvarkw=lambda name: '**' + name, (1)
L172 formatvalue=lambda value: '=' + repr(value), (1)
L173 join=joinseq): (1)
L168 def formatargvalues(args, varargs, varkw, locals, (1)
datetime.py (1)
L1 try: (1)
L2 from _datetime import * (1)
exceptions.py (1)
L1 """ (1)
L36 __all__ = [ (1)
L43 if '_is_loaded' in globals(): (1)
L45 _is_loaded = True (1)
L48 class ComplexWarning(RuntimeWarning): (2)
L49 """ (1)
L56 pass (1)
L59 class ModuleDeprecationWarning(DeprecationWarning): (2)
L60 """Module deprecation warning. (1)
L73 pass (1)
L76 class VisibleDeprecationWarning(UserWarning): (2)
L77 """Visible deprecation warning. (1)
L84 pass (1)
L87 class RankWarning(RuntimeWarning): (2)
L88 """Matrix rank warning. (1)
L93 pass (1)
L97 class TooHardError(RuntimeError): (2)
L98 """max_work was exceeded. (1)
L106 pass (1)
L109 class AxisError(ValueError, IndexError): (2)
L110 """Axis supplied was invalid. (1)
L174 __slots__ = ("axis", "ndim", "_msg") (1)
L176 def __init__(self, axis, ndim=None, msg_prefix=None): (1)
L187 def __str__(self): (1)
L200 class DTypePromotionError(TypeError): (2)
L201 """Multiple DTypes could not be converted to a common one. (1)
L247 pass (1)
_exceptions.py (1)
L1 """ (1)
L8 from .._utils import set_module (1)
printoptions.py (1)
L1 """ (1)
L9 import sys (1)
L10 from contextvars import ContextVar (1)
contextvars.py (1)
L1 from _contextvars import Context, ContextVar, Token, copy_context (1)
dtypes.py (1)
L1 """ (1)
L27 __all__ = [] (1)
L30 def _add_dtype_helper(DType, alias): (1)
<frozen importlib._bootstrap_external> (6)
L1330 (8)
L1331 (4)
L1323 (4)
L1324 (2)
umath.py (1)
L1 """ (1)
L9 import numpy (1)
numerictypes.py (1)
L1 """ (1)
L79 import numbers (1)
numbers.py (1)
L4 """Abstract Base Classes (ABCs) for numbers, according to PEP 3141. (1)
L33 from abc import ABCMeta, abstractmethod (1)
L35 __all__ = ["Number", "Complex", "Real", "Rational", "Integral"] (1)
L37 class Number(metaclass=ABCMeta): (2)
L38 """All numbers inherit from this class. (1)
L43 __slots__ = () (1)
L46 __hash__ = None (1)
<frozen abc> (1)
L106 (1)
L107 (1)
L108 (1)
L57 class Complex(Number): (2)
L58 """Complex defines the operations that work on the builtin complex type. (1)
L68 __slots__ = () (1)
L70 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L71 def __complex__(self): (2)
L74 def __bool__(self): (1)
L78 @property (2)
L79 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L80 def real(self): (2)
L87 @property (2)
L88 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L89 def imag(self): (2)
L96 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L97 def __add__(self, other): (2)
L101 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L102 def __radd__(self, other): (2)
L106 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L107 def __neg__(self): (2)
L111 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L112 def __pos__(self): (2)
L116 def __sub__(self, other): (1)
L120 def __rsub__(self, other): (1)
L124 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L125 def __mul__(self, other): (2)
L129 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L130 def __rmul__(self, other): (2)
L134 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L135 def __truediv__(self, other): (2)
L139 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L140 def __rtruediv__(self, other): (2)
L144 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L145 def __pow__(self, exponent): (2)
L149 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L150 def __rpow__(self, base): (2)
L154 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L155 def __abs__(self): (2)
L159 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L160 def conjugate(self): (2)
L164 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L165 def __eq__(self, other): (2)
<frozen abc> (1)
L106 (1)
L107 (1)
L108 (1)
L169 Complex.register(complex) (1)
<frozen abc> (1)
L115 (1)
L123 (1)
L172 class Real(Complex): (2)
L173 """To Complex, Real adds the operations that work on real numbers. (1)
L181 __slots__ = () (1)
L183 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L184 def __float__(self): (2)
L190 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L191 def __trunc__(self): (2)
L203 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L204 def __floor__(self): (2)
L208 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L209 def __ceil__(self): (2)
L213 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L214 def __round__(self, ndigits=None): (2)
L222 def __divmod__(self, other): (1)
L230 def __rdivmod__(self, other): (1)
L238 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L239 def __floordiv__(self, other): (2)
L243 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L244 def __rfloordiv__(self, other): (2)
L248 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L249 def __mod__(self, other): (2)
L253 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L254 def __rmod__(self, other): (2)
L258 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L259 def __lt__(self, other): (2)
L265 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L266 def __le__(self, other): (2)
L271 def __complex__(self): (1)
L275 @property (2)
L276 def real(self): (2)
L280 @property (2)
L281 def imag(self): (2)
L285 def conjugate(self): (1)
<frozen abc> (1)
L106 (1)
L107 (1)
L108 (1)
L289 Real.register(float) (1)
<frozen abc> (1)
L115 (1)
L123 (1)
L292 class Rational(Real): (2)
L293 """To Real, Rational adds numerator and denominator properties. (1)
L299 __slots__ = () (1)
L301 @property (2)
L302 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L303 def numerator(self): (2)
L307 @property (2)
L308 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L309 def denominator(self): (2)
L317 def __float__(self): (1)
<frozen abc> (1)
L106 (1)
L107 (1)
L108 (1)
L328 class Integral(Rational): (2)
L329 """Integral adds methods that work on integral numbers. (1)
L335 __slots__ = () (1)
L337 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L338 def __int__(self): (2)
L342 def __index__(self): (1)
L346 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L347 def __pow__(self, exponent, modulus=None): (2)
L357 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L358 def __lshift__(self, other): (2)
L362 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L363 def __rlshift__(self, other): (2)
L367 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L368 def __rshift__(self, other): (2)
L372 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L373 def __rrshift__(self, other): (2)
L377 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L378 def __and__(self, other): (2)
L382 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L383 def __rand__(self, other): (2)
L387 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L388 def __xor__(self, other): (2)
L392 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L393 def __rxor__(self, other): (2)
L397 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L398 def __or__(self, other): (2)
L402 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L403 def __ror__(self, other): (2)
L407 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L408 def __invert__(self): (2)
L413 def __float__(self): (1)
L417 @property (2)
L418 def numerator(self): (2)
L422 @property (2)
L423 def denominator(self): (2)
<frozen abc> (1)
L106 (1)
L107 (1)
L108 (1)
L427 Integral.register(int) (1)
<frozen abc> (1)
L115 (1)
L123 (1)
_string_helpers.py (1)
L1 """ (1)
L9 _all_chars = tuple(map(chr, range(256))) (1)
L10 _ascii_upper = _all_chars[65:65+26] (1)
L11 _ascii_lower = _all_chars[97:97+26] (1)
L12 LOWER_TABLE = _all_chars[:65] + _ascii_lower + _all_chars[65+26:] (1)
L13 UPPER_TABLE = _all_chars[:97] + _ascii_upper + _all_chars[97+26:] (1)
L16 def english_lower(s): (1)
L44 def english_upper(s): (1)
L72 def english_capitalize(s): (1)
_type_aliases.py (1)
L1 """ (1)
L20 import numpy._core.multiarray as ma (1)
_dtype.py (1)
L1 """ (1)
L6 import numpy as np (1)
numeric.py (1)
L1 import functools (1)
L2 import itertools (1)
L3 import operator (1)
L4 import sys (1)
L5 import warnings (1)
L6 import numbers (1)
L7 import builtins (1)
L8 import math (1)
L10 import numpy as np (1)
shape_base.py (1)
L1 __all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'block', 'hstack', (1)
L4 import functools (1)
L5 import itertools (1)
L6 import operator (1)
L8 from . import numeric as _nx (1)
fromnumeric.py (1)
L1 """Module containing non-deprecated functions borrowed from Numeric. (1)
L4 import functools (1)
L5 import types (1)
L6 import warnings (1)
L8 import numpy as np (1)
_methods.py (1)
L1 """ (1)
L6 import os (1)
L7 import pickle (1)
L8 import warnings (1)
L9 from contextlib import nullcontext (1)
L11 import numpy as np (1)
_ufunc_config.py (1)
L1 """ (1)
L7 import contextlib (1)
L8 import contextvars (1)
L9 import functools (1)
L11 from .._utils import set_module (1)
arrayprint.py (1)
L1 """Array printing function (1)
L6 __all__ = ["array2string", "array_str", "array_repr", (1)
L9 __docformat__ = 'restructuredtext' (1)
L25 import functools (1)
L26 import numbers (1)
L27 import sys (1)
L28 try: (1)
L29 from _thread import get_ident (1)
L33 import numpy as np (1)
_asarray.py (1)
L1 """ (1)
L6 from .overrides import ( (1)
records.py (1)
L1 """ (1)
L4 import os (1)
L5 import warnings (1)
L6 from collections import Counter (1)
memmap.py (1)
L1 from contextlib import nullcontext (1)
L2 import operator (1)
L3 import numpy as np (1)
function_base.py (1)
L1 import functools (1)
L2 import warnings (1)
L3 import operator (1)
L4 import types (1)
L6 import numpy as np (1)
_machar.py (1)
L1 """ (1)
L8 __all__ = ['MachAr'] (1)
L10 from .fromnumeric import any (1)
getlimits.py (1)
L1 """Machine limits for Float32 and Float64 and (long double) if available... (1)
L4 __all__ = ['finfo', 'iinfo'] (1)
L6 import types (1)
L7 import warnings (1)
L9 from .._utils import set_module (1)
einsumfunc.py (1)
L1 """ (1)
L5 import itertools (1)
L6 import operator (1)
L8 from numpy._core.multiarray import c_einsum (1)
L9 from numpy._core.numeric import asanyarray, tensordot (1)
L10 from numpy._core.overrides import array_function_dispatch (1)
L12 __all__ = ['einsum', 'einsum_path'] (1)
L16 einsum_symbols = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' (1)
L17 einsum_symbols_set = set(einsum_symbols) (1)
L20 def _flop_count(idx_contraction, inner, num_terms, size_dictionary): (1)
L58 def _compute_size_by_dict(indices, idx_dict): (1)
L87 def _find_contraction(positions, input_sets, output_set): (1)
L147 def _optimal_path(input_sets, output_set, idx_dict, memory_limit): (1)
L221 def _parse_possible_contraction( (1)
L285 def _update_other_results(results, best): (1)
L327 def _greedy_path(input_sets, output_set, idx_dict, memory_limit): (1)
L442 def _can_dot(inputs, result, idx_removed): (1)
L552 def _parse_einsum_input(operands): (1)
L732 def _einsum_path_dispatcher(*operands, optimize=None, einsum_call=None): (1)
L742 @array_function_dispatch(_einsum_path_dispatcher, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L743 def einsum_path(*operands, optimize='greedy', einsum_call=False): (2)
L1049 def _einsum_dispatcher(*operands, out=None, optimize=None, **kwargs): (1)
L1057 @array_function_dispatch(_einsum_dispatcher, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1058 def einsum(*operands, out=None, optimize=False, **kwargs): (2)
_add_newdocs.py (1)
L1 """ (1)
L12 from numpy._core.function_base import add_newdoc (1)
L13 from numpy._core.overrides import get_array_function_like_doc (1)
L24 add_newdoc('numpy._core', 'flatiter', (2)
function_base.py (1)
L534 new = getattr(__import__(place, globals(), {}, [obj]), obj) (1)
L25 """ (1)
_add_newdocs_scalars.py (1)
L1 """ (1)
L6 import sys (1)
L7 import os (1)
L8 from numpy._core import dtype (1)
_dtype_ctypes.py (1)
L1 """ (1)
L29 import numpy as np (1)
_internal.py (1)
L1 """ (1)
L7 import ast (1)
L8 import math (1)
L9 import re (1)
L10 import sys (1)
L11 import warnings (1)
L13 from ..exceptions import DTypePromotionError (1)
_endian.py (1)
L1 import sys (1)
L2 from ctypes import Array, Structure, Union (1)
_pytesttester.py (1)
L1 """ (1)
L31 import sys (1)
L32 import os (1)
L34 __all__ = ['PytestTester'] (1)
L37 def _show_numpy_info(): (1)
L45 class PytestTester: (2)
L46 """ (1)
L75 def __init__(self, module_name): (1)
L79 def __call__(self, label='fast', verbose=1, extra_argv=None, (2)
L80 doctests=False, coverage=False, durations=-1, tests=None): (1)
array_utils.py (1)
L1 from ._array_utils_impl import ( (1)
_array_utils_impl.py (1)
L1 """ (1)
L4 from numpy._core import asarray (1)
introspect.py (1)
L1 """ (1)
L4 import re (1)
L6 __all__ = ['opt_func_info'] (1)
L9 def opt_func_info(func_name=None, signature=None): (1)
mixins.py (1)
L1 """ (1)
L4 from numpy._core import umath as um (1)
npyio.py (1)
L1 from ._npyio_impl import ( (1)
_npyio_impl.py (1)
L1 """ (1)
L4 import os (1)
L5 import re (1)
L6 import functools (1)
L7 import itertools (1)
L8 import warnings (1)
L9 import weakref (1)
L10 import contextlib (1)
L11 import operator (1)
L12 from operator import itemgetter (1)
L13 from collections.abc import Mapping (1)
L14 import pickle (1)
L16 import numpy as np (1)
format.py (1)
L1 """ (1)
L164 import io (1)
L165 import os (1)
L166 import pickle (1)
L167 import warnings (1)
L169 import numpy (1)
_utils_impl.py (1)
L1 import os (1)
L2 import sys (1)
L3 import textwrap (1)
textwrap.py (1)
L1 """Text wrapping and filling. (1)
L8 import re (1)
L10 __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent', 'shorten'] (1)
L15 _whitespace = '\t\n\x0b\x0c\r ' (1)
L17 class TextWrapper: (2)
L18 """ (1)
L66 unicode_whitespace_trans = dict.fromkeys(map(ord, _whitespace), ord(' ')) (1)
L74 word_punct = r'[\w!"\'&.,?]' (1)
L75 letter = r'[^\d\W]' (1)
L76 whitespace = r'[%s]' % re.escape(_whitespace) (1)
__init__.py (1)
L309 if isinstance(pattern, str): (1)
L310 return pattern.translate(_special_chars_map) (1)
L77 nowhitespace = '[^' + whitespace[1:] (1)
L78 wordsep_re = re.compile(r''' (3)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L333 flags = flags.value (1)
enum.py (1)
L200 if instance is None: (1)
L207 if self.fget is not None: (1)
L209 return self.fget(instance) (1)
L1340 return self._value_ (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (449)
L241 try: (449)
L242 char = self.decoded_string[index] (449)
L246 if char == "\\": (448)
L253 self.index = index + 1 (448)
L254 self.next = char (448)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (12)
L455 itemsappend = items.append (12)
L456 sourcematch = source.match (12)
L457 start = source.tell() (12)
L293 return self.index - len(self.next or '') (39)
L458 while True: (18)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (36)
L460 not nested and not items)) (18)
L513 subpattern = SubPattern(state) (18)
L113 self.state = state (28)
L114 if data is None: (28)
L115 data = [] (22)
L116 self.data = data (28)
L117 self.width = None (28)
L516 subpatternappend = subpattern.append (18)
L517 sourceget = source.get (18)
L518 sourcematch = source.match (18)
L519 _len = len (18)
L520 _ord = ord (18)
L522 while True: (251)
L524 this = source.next (251)
L525 if this is None: (251)
L527 if this in "|)": (250)
L529 sourceget() (233)
L261 this = self.next (409)
L262 self.__next() (409)
L263 return this (409)
L531 if verbose: (233)
L533 if this in WHITESPACE: (233)
L534 continue (190)
L535 if this == "#": (43)
L542 if this[0] == "\\": (37)
L546 elif this not in SPECIAL_CHARS: (34)
L549 elif this == "[": (27)
L638 elif this in REPEAT_CHARS: (17)
L705 elif this == ".": (11)
L708 elif this == "(": (11)
L709 start = source.tell() - 1 (11)
L710 capture = True (11)
L711 atomic = False (11)
L712 name = None (11)
L713 add_flags = 0 (11)
L714 del_flags = 0 (11)
L715 if sourcematch("?"): (11)
L256 if char == self.next: (111)
L259 return False (72)
L854 if capture: (3)
L855 try: (1)
L856 group = state.opengroup(name) (1)
L86 gid = self.groups (1)
L84 return len(self.groupwidths) (6)
L87 self.groupwidths.append(None) (1)
L88 if self.groups > MAXGROUPS: (1)
L90 if name is not None: (1)
L96 return gid (1)
L861 sub_verbose = ((verbose or (add_flags & SRE_FLAG_VERBOSE)) and (6)
L862 not (del_flags & SRE_FLAG_VERBOSE)) (3)
L863 p = _parse_sub(source, state, sub_verbose, nested + 1) (3)
L536 while True: (105)
L537 this = sourceget() (105)
L538 if this is None or this == "\n": (105)
L539 break (6)
L540 continue (6)
L247 index += 1 (35)
L248 try: (35)
L249 char += self.decoded_string[index] (35)
L550 here = source.tell() - 1 (10)
L552 set = [] (10)
L553 setappend = set.append (10)
L556 if source.next == '[': (10)
L562 negate = sourcematch("^") (10)
L564 while True: (54)
L565 this = sourceget() (54)
L566 if this is None: (54)
L569 if this == "]" and set: (54)
L571 elif this[0] == "\\": (44)
L572 code1 = _class_escape(source, this) (32)
L313 code = ESCAPES.get(escape) (32)
L314 if code: (32)
L316 code = CATEGORIES.get(escape) (32)
L317 if code and code[0] is IN: (32)
L319 try: (20)
L320 c = escape[1:2] (20)
L321 if c == "x": (20)
L327 elif c == "u" and source.istext: (20)
L333 elif c == "U" and source.istext: (20)
L341 elif c == "N" and source.istext: (20)
L353 elif c in OCTDIGITS: (20)
L361 elif c in DIGITS: (20)
L363 if len(escape) == 2: (20)
L364 if c in ASCIILETTERS: (20)
L366 return LITERAL, ord(escape[1]) (20)
L586 if sourcematch("-"): (44)
L619 if code1[0] is IN: (44)
L621 setappend(code1) (44)
L570 break (10)
L623 set = _uniq(set) (10)
L449 return list(dict.fromkeys(items)) (10)
L625 if _len(set) == 1 and set[0][0] is LITERAL: (10)
L632 if negate: (10)
L636 subpatternappend((IN, set)) (10)
L176 self.data.append(code) (35)
L640 here = source.tell() (6)
L641 if this == "?": (6)
L643 elif this == "*": (5)
L646 elif this == "+": (5)
L647 min, max = 1, MAXREPEAT (2)
L681 if subpattern: (6)
L164 return len(self.data) (45)
L682 item = subpattern[-1:] (6)
L168 if isinstance(index, slice): (71)
L169 return SubPattern(self.state, self.data[index]) (6)
L685 if not item or item[0][0] is AT: (6)
L170 return self.data[index] (65)
L688 if item[0][0] in _REPEATCODES: (6)
L691 if item[0][0] is SUBPATTERN: (6)
L695 if sourcematch("?"): (6)
L698 elif sourcematch("+"): (5)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (5)
L172 self.data[index] = code (8)
L528 break # end of subpattern (17)
L885 for i in range(len(subpattern))[::-1]: (49)
L886 op, av = subpattern[i] (31)
L887 if op is SUBPATTERN: (31)
L892 return subpattern (18)
L461 if not sourcematch("|"): (18)
L257 self.__next() (39)
L258 return True (39)
L463 if not nested: (6)
L717 char = sourceget() (10)
L718 if char is None: (10)
L720 if char == "P": (10)
L747 elif char == ":": (10)
L750 elif char == "#": (8)
L760 elif char in "=!<": (8)
L762 dir = 1 (8)
L763 if char == "<": (8)
L764 char = sourceget() (4)
L765 if char is None: (4)
L767 if char not in "=!": (4)
L770 dir = -1 # lookbehind (4)
L771 lookbehindgroups = state.lookbehindgroups (4)
L772 if lookbehindgroups is None: (4)
L773 state.lookbehindgroups = state.groups (4)
L774 p = _parse_sub(source, state, verbose, nested + 1) (8)
L318 return code (12)
L620 code1 = code1[1][0] (12)
L574 if set and this in '-&~|' and source.next == this: (12)
L585 code1 = LITERAL, _ord(this) (12)
L462 break (12)
L466 if len(items) == 1: (12)
L467 return items[0] (8)
L775 if dir < 0: (8)
L776 if lookbehindgroups is None: (4)
L777 state.lookbehindgroups = None (4)
L778 if not sourcematch(")"): (8)
L781 if char == "=": (8)
L782 subpatternappend((ASSERT, (dir, p))) (8)
L787 continue (8)
L547 subpatternappend((LITERAL, _ord(this))) (7)
L648 elif this == "{": (3)
L649 if source.next == "}": (3)
L653 min, max = 0, MAXREPEAT (3)
L654 lo = hi = "" (3)
L655 while source.next in DIGITS: (6)
L656 lo += sourceget() (3)
L657 if sourcematch(","): (3)
L658 while source.next in DIGITS: (2)
L662 if not sourcematch("}"): (3)
L667 if lo: (3)
L668 min = int(lo) (3)
L669 if min >= MAXREPEAT: (3)
L671 if hi: (3)
L543 code = _escape(source, this, state) (3)
L373 code = CATEGORIES.get(escape) (3)
L374 if code: (3)
L375 return code (3)
L544 subpatternappend(code) (3)
L633 set.insert(0, (NEGATE, None)) (6)
L697 subpattern[-1] = (MIN_REPEAT, (min, max, item)) (1)
L749 capture = False (2)
L860 group = None (2)
L661 hi = lo (1)
L672 max = int(hi) (1)
L673 if max >= MAXREPEAT: (1)
L675 if max < min: (1)
L469 subpattern = SubPattern(state) (4)
L472 while True: (4)
L473 prefix = None (4)
L474 for item in items: (8)
L475 if not item: (8)
L477 if prefix is None: (8)
L478 prefix = item[0] (4)
L479 elif item[0] != prefix: (4)
L480 break (4)
L488 break (4)
L491 set = [] (4)
L492 for item in items: (5)
L493 if len(item) != 1: (5)
L495 op, av = item[0] (4)
L496 if op is LITERAL: (4)
L498 elif op is IN and av[0][0] is not NEGATE: (4)
L501 break (3)
L508 subpattern.append((BRANCH, (None, items))) (4)
L509 return subpattern (4)
L864 if not source.match(")"): (3)
L867 if group is not None: (3)
L869 if atomic: (3)
L873 subpatternappend((SUBPATTERN, (group, add_flags, del_flags, p))) (3)
L642 min, max = 0, 1 (1)
L888 group, add_flags, del_flags, p = av (3)
L889 if group is None and not add_flags and not del_flags: (3)
L890 subpattern[i: i+1] = p (2)
L499 set.extend(av) (1)
L494 break (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L868 state.closegroup(group, p) (1)
L98 self.groupwidths[gid] = p.getwidth() (1)
L179 if self.width is not None: (12)
L181 lo = hi = 0 (12)
L182 for op, av in self.data: (30)
L183 if op is BRANCH: (18)
L184 i = MAXWIDTH (3)
L185 j = 0 (3)
L186 for av in av[1]: (11)
L187 l, h = av.getwidth() (8)
L192 elif op is ATOMIC_GROUP: (15)
L196 elif op is SUBPATTERN: (15)
L200 elif op in _REPEATCODES: (15)
L201 i, j = av[2].getwidth() (3)
L207 elif op in _UNITCODES: (12)
L208 lo = lo + 1 (4)
L209 hi = hi + 1 (4)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (12)
L227 return self.width (12)
L202 lo = lo + i * av[0] (3)
L203 if av[1] == MAXREPEAT and j: (3)
L204 hi = MAXWIDTH (3)
L188 i = min(i, l) (8)
L189 j = max(j, h) (8)
L210 elif op is GROUPREF: (8)
L214 elif op is GROUPREF_EXISTS: (8)
L224 elif op is SUCCESS: (8)
L190 lo = lo + i (3)
L191 hi = hi + j (3)
L526 break # end of pattern (1)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (1)
L182 for op, av in self.data: (2)
L183 if op is BRANCH: (1)
L192 elif op is ATOMIC_GROUP: (1)
L196 elif op is SUBPATTERN: (1)
L197 i, j = av[-1].getwidth() (1)
L180 return self.width (1)
L198 lo = lo + i (1)
L199 hi = hi + j (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (1)
L227 return self.width (1)
L519 if hi > MAXCODE: (1)
L520 hi = MAXCODE (1)
L521 if lo == 0: (1)
L525 prefix = [] (1)
L526 prefix_skip = 0 (1)
L527 charset = [] # not used (1)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (1)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (1)
L441 prefix = [] (2)
L442 prefixappend = prefix.append (2)
L443 prefix_skip = None (2)
L444 iscased = _get_iscased(flags) (2)
L432 if not flags & SRE_FLAG_IGNORECASE: (3)
L433 return None (3)
L445 for op, av in pattern.data: (2)
L446 if op is LITERAL: (2)
L450 elif op is SUBPATTERN: (2)
L451 group, add_flags, del_flags, p = av (1)
L452 flags1 = _combine_flags(flags, add_flags, del_flags) (1)
L33 if add_flags & TYPE_FLAGS: (3)
L35 return (flags | add_flags) & ~del_flags (3)
L453 if flags1 & SRE_FLAG_IGNORECASE and flags1 & SRE_FLAG_LOCALE: (1)
L455 prefix1, prefix_skip1, got_all = _get_literal_prefix(p, flags1) (1)
L465 break (1)
L468 return prefix, prefix_skip, False (2)
L456 if prefix_skip is None: (1)
L457 if group is not None: (1)
L458 prefix_skip = len(prefix) (1)
L461 prefix.extend(prefix1) (1)
L462 if not got_all: (1)
L463 break (1)
L532 if not prefix: (1)
L533 charset = _get_charset_prefix(pattern, flags) (1)
L471 while True: (2)
L472 if not pattern.data: (2)
L474 op, av = pattern.data[0] (2)
L475 if op is not SUBPATTERN: (2)
L477 group, add_flags, del_flags, pattern = av (1)
L478 flags = _combine_flags(flags, add_flags, del_flags) (1)
L479 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (1)
L476 break (1)
L482 iscased = _get_iscased(flags) (1)
L483 if op is LITERAL: (1)
L487 elif op is BRANCH: (1)
L488 charset = [] (1)
L489 charsetappend = charset.append (1)
L490 for p in av[1]: (1)
L491 if not p: (1)
_parser.py (1)
L164 return len(self.data) (1)
L493 op, av = p[0] (1)
_parser.py (1)
L168 if isinstance(index, slice): (1)
L170 return self.data[index] (1)
L494 if op is LITERAL and not (iscased and iscased(av)): (1)
L497 return None (1)
L539 emit = code.append (1)
L540 emit(INFO) (1)
L541 skip = len(code); emit(0) (1)
L543 mask = 0 (1)
L544 if prefix: (1)
L548 elif charset: (1)
L550 emit(mask) (1)
L552 if lo < MAXCODE: (1)
L553 emit(lo) (1)
L557 emit(hi) (1)
L559 if prefix: (1)
L567 elif charset: (1)
L571 code[skip] = len(code) - skip (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (26)
L40 _len = len (26)
L41 LITERAL_CODES = _LITERAL_CODES (26)
L42 REPEATING_CODES = _REPEATING_CODES (26)
L43 SUCCESS_CODES = _SUCCESS_CODES (26)
L44 ASSERT_CODES = _ASSERT_CODES (26)
L45 iscased = None (26)
L46 tolower = None (26)
L47 fixes = None (26)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (26)
L56 for op, av in pattern: (65)
_parser.py (63)
L168 if isinstance(index, slice): (63)
L170 return self.data[index] (63)
L57 if op in LITERAL_CODES: (39)
L85 elif op is IN: (32)
L98 elif op is ANY: (20)
L103 elif op in REPEATING_CODES: (20)
L120 elif op is SUBPATTERN: (14)
L121 group, add_flags, del_flags, p = av (1)
L122 if group: (1)
L123 emit(MARK) (1)
L124 emit((group-1)*2) (1)
L126 _compile(code, p, _combine_flags(flags, add_flags, del_flags)) (1)
L130 elif op is ATOMIC_GROUP: (13)
L141 elif op in SUCCESS_CODES: (13)
L143 elif op in ASSERT_CODES: (13)
L158 elif op is AT: (5)
L167 elif op is BRANCH: (4)
L168 emit(op) (4)
L169 tail = [] (4)
L170 tailappend = tail.append (4)
L171 for av in av[1]: (14)
L172 skip = _len(code); emit(0) (10)
L174 _compile(code, av, flags) (10)
L104 if _simple(av[2]): (6)
L403 if len(p) != 1: (6)
_parser.py (6)
L164 return len(self.data) (6)
L405 op, av = p[0] (6)
_parser.py (6)
L168 if isinstance(index, slice): (6)
L170 return self.data[index] (6)
L406 if op is SUBPATTERN: (6)
L408 return op in _UNIT_CODES (6)
L105 emit(REPEATING_CODES[op][2]) (6)
L106 skip = _len(code); emit(0) (6)
L107 emit(av[0]) (6)
L108 emit(av[1]) (6)
L109 _compile(code, av[2], flags) (6)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (12)
L243 out = [] (12)
L244 tail = [] (12)
L245 charmap = bytearray(256) (12)
L246 hascased = False (12)
L247 for op, av in charset: (64)
L248 while True: (52)
L249 try: (52)
L250 if op is LITERAL: (52)
L251 if fixup: # IGNORECASE and not LOCALE (32)
L260 charmap[av] = 1 (32)
L309 break (52)
L312 runs = [] (12)
L313 q = 0 (12)
L314 while True: (22)
L315 p = charmap.find(1, q) (22)
L316 if p < 0: (22)
L318 if len(runs) >= 2: (12)
L321 q = charmap.find(0, p) (10)
L322 if q < 0: (10)
L325 runs.append((p, q)) (10)
L317 break (10)
L326 if runs is not None: (12)
L328 for p, q in runs: (16)
L329 if q - p == 1: (6)
L332 out.append((RANGE, (p, q - 1))) (3)
L330 out.append((LITERAL, p)) (3)
L333 out += tail (10)
L335 if hascased or len(out) < len(charset): (10)
L336 return out, hascased (3)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (12)
L89 elif not hascased: (12)
L90 emit(IN) (12)
L95 skip = _len(code); emit(0) (12)
L96 _compile_charset(charset, flags, code) (12)
L216 emit = code.append (12)
L217 for op, av in charset: (40)
L218 emit(op) (28)
L219 if op is NEGATE: (28)
L221 elif op is LITERAL: (22)
L223 elif op is RANGE or op is RANGE_UNI_IGNORE: (19)
L224 emit(av[0]) (3)
L225 emit(av[1]) (3)
L222 emit(av) (3)
L239 emit(FAILURE) (12)
L97 code[skip] = _len(code) - skip (12)
L110 emit(SUCCESS) (6)
L111 code[skip] = _len(code) - skip (6)
L175 emit(JUMP) (10)
L176 tailappend(_len(code)); emit(0) (10)
L177 code[skip] = _len(code) - skip (10)
L144 emit(op) (8)
L145 skip = _len(code); emit(0) (8)
L146 if av[0] >= 0: (8)
L149 lo, hi = av[1].getwidth() (4)
_parser.py (4)
L179 if self.width is not None: (5)
L181 lo = hi = 0 (5)
L182 for op, av in self.data: (14)
L183 if op is BRANCH: (9)
L192 elif op is ATOMIC_GROUP: (9)
L196 elif op is SUBPATTERN: (9)
L200 elif op in _REPEATCODES: (9)
L207 elif op in _UNITCODES: (8)
L208 lo = lo + 1 (8)
L209 hi = hi + 1 (8)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (5)
L227 return self.width (5)
L201 i, j = av[2].getwidth() (1)
L202 lo = lo + i * av[0] (1)
L203 if av[1] == MAXREPEAT and j: (1)
L206 hi = hi + j * av[1] (1)
L150 if lo > MAXCODE: (4)
L152 if lo != hi: (4)
L154 emit(lo) # look behind (4)
L155 _compile(code, av[1], flags) (8)
L261 elif op is RANGE: (20)
L278 elif op is NEGATE: (20)
L281 tail.append((op, av)) (14)
L319 runs = None (2)
L320 break (2)
L341 if len(charmap) == 256: (2)
L342 data = _mk_bitmap(charmap) (2)
L390 s = bits.translate(_BITS_TRANS)[::-1] (2)
L392 for i in range(len(s), 0, -_CODEBITS)] (20)
L391 return [_int(s[i - _CODEBITS: i], 2) (20)
L343 out.append((CHARSET, data)) (2)
L344 out += tail (2)
L345 return out, hascased (2)
L226 elif op is CHARSET: (16)
L227 code.extend(av) (2)
L228 elif op is BIGCHARSET: (14)
L230 elif op is CATEGORY: (14)
L231 if flags & SRE_FLAG_LOCALE: (14)
L233 elif flags & SRE_FLAG_UNICODE: (14)
L234 emit(CH_UNICODE[av]) (14)
L156 emit(SUCCESS) (8)
L157 code[skip] = _len(code) - skip (8)
L58 if not flags & SRE_FLAG_IGNORECASE: (7)
L59 emit(op) (7)
L60 emit(av) (7)
L147 emit(0) # look ahead (4)
L338 return charset, hascased (7)
L279 out.append((op, av)) (6)
L220 pass (6)
L178 emit(FAILURE) # end of branch (4)
L179 for tail in tail: (14)
L180 code[tail] = _len(code) - tail (10)
L159 emit(op) (1)
L160 if flags & SRE_FLAG_MULTILINE: (1)
L162 if flags & SRE_FLAG_LOCALE: (1)
L164 elif flags & SRE_FLAG_UNICODE: (1)
L165 av = AT_UNICODE.get(av, av) (1)
L166 emit(av) (1)
L127 if group: (1)
L128 emit(MARK) (1)
L129 emit((group-1)*2+1) (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (1)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L93 )''' % {'wp': word_punct, 'lt': letter, (2)
L94 'ws': whitespace, 'nws': nowhitespace}, (1)
L95 re.VERBOSE) (1)
L96 del word_punct, letter, nowhitespace (1)
L102 wordsep_simple_re = re.compile(r'(%s+)' % whitespace) (1)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (12)
L241 try: (12)
L242 char = self.decoded_string[index] (12)
L246 if char == "\\": (11)
L253 self.index = index + 1 (11)
L254 self.next = char (11)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (2)
L455 itemsappend = items.append (2)
L456 sourcematch = source.match (2)
L457 start = source.tell() (2)
L293 return self.index - len(self.next or '') (5)
L458 while True: (2)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (4)
L460 not nested and not items)) (2)
L513 subpattern = SubPattern(state) (2)
L113 self.state = state (3)
L114 if data is None: (3)
L115 data = [] (2)
L116 self.data = data (3)
L117 self.width = None (3)
L516 subpatternappend = subpattern.append (2)
L517 sourceget = source.get (2)
L518 sourcematch = source.match (2)
L519 _len = len (2)
L520 _ord = ord (2)
L522 while True: (5)
L524 this = source.next (5)
L525 if this is None: (5)
L527 if this in "|)": (4)
L529 sourceget() (3)
L261 this = self.next (10)
L262 self.__next() (10)
L263 return this (10)
L531 if verbose: (3)
L542 if this[0] == "\\": (3)
L546 elif this not in SPECIAL_CHARS: (3)
L549 elif this == "[": (3)
L638 elif this in REPEAT_CHARS: (2)
L705 elif this == ".": (1)
L708 elif this == "(": (1)
L709 start = source.tell() - 1 (1)
L710 capture = True (1)
L711 atomic = False (1)
L712 name = None (1)
L713 add_flags = 0 (1)
L714 del_flags = 0 (1)
L715 if sourcematch("?"): (1)
L256 if char == self.next: (13)
L259 return False (12)
L854 if capture: (1)
L855 try: (1)
L856 group = state.opengroup(name) (1)
L86 gid = self.groups (1)
L84 return len(self.groupwidths) (2)
L87 self.groupwidths.append(None) (1)
L88 if self.groups > MAXGROUPS: (1)
L90 if name is not None: (1)
L96 return gid (1)
L861 sub_verbose = ((verbose or (add_flags & SRE_FLAG_VERBOSE)) and (1)
L863 p = _parse_sub(source, state, sub_verbose, nested + 1) (1)
L247 index += 1 (6)
L248 try: (6)
L249 char += self.decoded_string[index] (6)
L550 here = source.tell() - 1 (1)
L552 set = [] (1)
L553 setappend = set.append (1)
L556 if source.next == '[': (1)
L562 negate = sourcematch("^") (1)
L564 while True: (7)
L565 this = sourceget() (7)
L566 if this is None: (7)
L569 if this == "]" and set: (7)
L571 elif this[0] == "\\": (6)
L572 code1 = _class_escape(source, this) (6)
L313 code = ESCAPES.get(escape) (6)
L314 if code: (6)
L316 code = CATEGORIES.get(escape) (6)
L317 if code and code[0] is IN: (6)
L319 try: (6)
L320 c = escape[1:2] (6)
L321 if c == "x": (6)
L327 elif c == "u" and source.istext: (6)
L333 elif c == "U" and source.istext: (6)
L341 elif c == "N" and source.istext: (6)
L353 elif c in OCTDIGITS: (6)
L361 elif c in DIGITS: (6)
L363 if len(escape) == 2: (6)
L364 if c in ASCIILETTERS: (6)
L366 return LITERAL, ord(escape[1]) (6)
L586 if sourcematch("-"): (6)
L619 if code1[0] is IN: (6)
L621 setappend(code1) (6)
L570 break (1)
L623 set = _uniq(set) (1)
L449 return list(dict.fromkeys(items)) (1)
L625 if _len(set) == 1 and set[0][0] is LITERAL: (1)
L632 if negate: (1)
L636 subpatternappend((IN, set)) (1)
L176 self.data.append(code) (2)
L640 here = source.tell() (1)
L641 if this == "?": (1)
L643 elif this == "*": (1)
L646 elif this == "+": (1)
L647 min, max = 1, MAXREPEAT (1)
L681 if subpattern: (1)
L164 return len(self.data) (4)
L682 item = subpattern[-1:] (1)
L168 if isinstance(index, slice): (6)
L169 return SubPattern(self.state, self.data[index]) (1)
L685 if not item or item[0][0] is AT: (1)
L170 return self.data[index] (5)
L688 if item[0][0] in _REPEATCODES: (1)
L691 if item[0][0] is SUBPATTERN: (1)
L695 if sourcematch("?"): (1)
L698 elif sourcematch("+"): (1)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (1)
L172 self.data[index] = code (1)
L528 break # end of subpattern (1)
L885 for i in range(len(subpattern))[::-1]: (4)
L886 op, av = subpattern[i] (2)
L887 if op is SUBPATTERN: (2)
L892 return subpattern (2)
L461 if not sourcematch("|"): (2)
L462 break (2)
L466 if len(items) == 1: (2)
L467 return items[0] (2)
L864 if not source.match(")"): (1)
L257 self.__next() (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L258 return True (1)
L867 if group is not None: (1)
L868 state.closegroup(group, p) (1)
L98 self.groupwidths[gid] = p.getwidth() (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (2)
L182 for op, av in self.data: (4)
L183 if op is BRANCH: (2)
L192 elif op is ATOMIC_GROUP: (2)
L196 elif op is SUBPATTERN: (2)
L200 elif op in _REPEATCODES: (2)
L201 i, j = av[2].getwidth() (1)
L207 elif op in _UNITCODES: (1)
L208 lo = lo + 1 (1)
L209 hi = hi + 1 (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (2)
L227 return self.width (2)
L202 lo = lo + i * av[0] (1)
L203 if av[1] == MAXREPEAT and j: (1)
L204 hi = MAXWIDTH (1)
L869 if atomic: (1)
L873 subpatternappend((SUBPATTERN, (group, add_flags, del_flags, p))) (1)
L526 break # end of pattern (1)
L888 group, add_flags, del_flags, p = av (1)
L889 if group is None and not add_flags and not del_flags: (1)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (1)
L182 for op, av in self.data: (2)
L183 if op is BRANCH: (1)
L192 elif op is ATOMIC_GROUP: (1)
L196 elif op is SUBPATTERN: (1)
L197 i, j = av[-1].getwidth() (1)
L180 return self.width (1)
L198 lo = lo + i (1)
L199 hi = hi + j (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (1)
L227 return self.width (1)
L519 if hi > MAXCODE: (1)
L520 hi = MAXCODE (1)
L521 if lo == 0: (1)
L525 prefix = [] (1)
L526 prefix_skip = 0 (1)
L527 charset = [] # not used (1)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (1)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (1)
L441 prefix = [] (2)
L442 prefixappend = prefix.append (2)
L443 prefix_skip = None (2)
L444 iscased = _get_iscased(flags) (2)
L432 if not flags & SRE_FLAG_IGNORECASE: (3)
L433 return None (3)
L445 for op, av in pattern.data: (2)
L446 if op is LITERAL: (2)
L450 elif op is SUBPATTERN: (2)
L451 group, add_flags, del_flags, p = av (1)
L452 flags1 = _combine_flags(flags, add_flags, del_flags) (1)
L33 if add_flags & TYPE_FLAGS: (3)
L35 return (flags | add_flags) & ~del_flags (3)
L453 if flags1 & SRE_FLAG_IGNORECASE and flags1 & SRE_FLAG_LOCALE: (1)
L455 prefix1, prefix_skip1, got_all = _get_literal_prefix(p, flags1) (1)
L465 break (1)
L468 return prefix, prefix_skip, False (2)
L456 if prefix_skip is None: (1)
L457 if group is not None: (1)
L458 prefix_skip = len(prefix) (1)
L461 prefix.extend(prefix1) (1)
L462 if not got_all: (1)
L463 break (1)
L532 if not prefix: (1)
L533 charset = _get_charset_prefix(pattern, flags) (1)
L471 while True: (2)
L472 if not pattern.data: (2)
L474 op, av = pattern.data[0] (2)
L475 if op is not SUBPATTERN: (2)
L477 group, add_flags, del_flags, pattern = av (1)
L478 flags = _combine_flags(flags, add_flags, del_flags) (1)
L479 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (1)
L476 break (1)
L482 iscased = _get_iscased(flags) (1)
L483 if op is LITERAL: (1)
L487 elif op is BRANCH: (1)
L499 elif op is IN: (1)
L512 return None (1)
L539 emit = code.append (1)
L540 emit(INFO) (1)
L541 skip = len(code); emit(0) (1)
L543 mask = 0 (1)
L544 if prefix: (1)
L548 elif charset: (1)
L550 emit(mask) (1)
L552 if lo < MAXCODE: (1)
L553 emit(lo) (1)
L557 emit(hi) (1)
L559 if prefix: (1)
L567 elif charset: (1)
L571 code[skip] = len(code) - skip (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (3)
L40 _len = len (3)
L41 LITERAL_CODES = _LITERAL_CODES (3)
L42 REPEATING_CODES = _REPEATING_CODES (3)
L43 SUCCESS_CODES = _SUCCESS_CODES (3)
L44 ASSERT_CODES = _ASSERT_CODES (3)
L45 iscased = None (3)
L46 tolower = None (3)
L47 fixes = None (3)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (3)
L56 for op, av in pattern: (6)
_parser.py (4)
L168 if isinstance(index, slice): (4)
L170 return self.data[index] (4)
L57 if op in LITERAL_CODES: (3)
L85 elif op is IN: (3)
L98 elif op is ANY: (2)
L103 elif op in REPEATING_CODES: (2)
L120 elif op is SUBPATTERN: (1)
L121 group, add_flags, del_flags, p = av (1)
L122 if group: (1)
L123 emit(MARK) (1)
L124 emit((group-1)*2) (1)
L126 _compile(code, p, _combine_flags(flags, add_flags, del_flags)) (1)
L104 if _simple(av[2]): (1)
L403 if len(p) != 1: (1)
_parser.py (1)
L164 return len(self.data) (1)
L405 op, av = p[0] (1)
_parser.py (1)
L168 if isinstance(index, slice): (1)
L170 return self.data[index] (1)
L406 if op is SUBPATTERN: (1)
L408 return op in _UNIT_CODES (1)
L105 emit(REPEATING_CODES[op][2]) (1)
L106 skip = _len(code); emit(0) (1)
L107 emit(av[0]) (1)
L108 emit(av[1]) (1)
L109 _compile(code, av[2], flags) (1)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (1)
L243 out = [] (1)
L244 tail = [] (1)
L245 charmap = bytearray(256) (1)
L246 hascased = False (1)
L247 for op, av in charset: (7)
L248 while True: (6)
L249 try: (6)
L250 if op is LITERAL: (6)
L251 if fixup: # IGNORECASE and not LOCALE (6)
L260 charmap[av] = 1 (6)
L309 break (6)
L312 runs = [] (1)
L313 q = 0 (1)
L314 while True: (3)
L315 p = charmap.find(1, q) (3)
L316 if p < 0: (3)
L318 if len(runs) >= 2: (2)
L321 q = charmap.find(0, p) (2)
L322 if q < 0: (2)
L325 runs.append((p, q)) (2)
L317 break (1)
L326 if runs is not None: (1)
L328 for p, q in runs: (3)
L329 if q - p == 1: (2)
L332 out.append((RANGE, (p, q - 1))) (1)
L330 out.append((LITERAL, p)) (1)
L333 out += tail (1)
L335 if hascased or len(out) < len(charset): (1)
L336 return out, hascased (1)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (1)
L89 elif not hascased: (1)
L90 emit(IN) (1)
L95 skip = _len(code); emit(0) (1)
L96 _compile_charset(charset, flags, code) (1)
L216 emit = code.append (1)
L217 for op, av in charset: (3)
L218 emit(op) (2)
L219 if op is NEGATE: (2)
L221 elif op is LITERAL: (2)
L223 elif op is RANGE or op is RANGE_UNI_IGNORE: (1)
L224 emit(av[0]) (1)
L225 emit(av[1]) (1)
L222 emit(av) (1)
L239 emit(FAILURE) (1)
L97 code[skip] = _len(code) - skip (1)
L110 emit(SUCCESS) (1)
L111 code[skip] = _len(code) - skip (1)
L127 if group: (1)
L128 emit(MARK) (1)
L129 emit((group-1)*2+1) (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (1)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L103 del whitespace (1)
L107 sentence_end_re = re.compile(r'[a-z]' # lowercase letter (1)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (17)
L241 try: (17)
L242 char = self.decoded_string[index] (17)
L246 if char == "\\": (16)
L253 self.index = index + 1 (16)
L254 self.next = char (16)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (1)
L455 itemsappend = items.append (1)
L456 sourcematch = source.match (1)
L457 start = source.tell() (1)
L293 return self.index - len(self.next or '') (5)
L458 while True: (1)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (2)
L460 not nested and not items)) (1)
L513 subpattern = SubPattern(state) (1)
L113 self.state = state (2)
L114 if data is None: (2)
L115 data = [] (1)
L116 self.data = data (2)
L117 self.width = None (2)
L516 subpatternappend = subpattern.append (1)
L517 sourceget = source.get (1)
L518 sourcematch = source.match (1)
L519 _len = len (1)
L520 _ord = ord (1)
L522 while True: (6)
L524 this = source.next (6)
L525 if this is None: (6)
L527 if this in "|)": (5)
L529 sourceget() (5)
L261 this = self.next (15)
L262 self.__next() (15)
L263 return this (15)
L531 if verbose: (5)
L542 if this[0] == "\\": (5)
L546 elif this not in SPECIAL_CHARS: (4)
L549 elif this == "[": (4)
L550 here = source.tell() - 1 (3)
L552 set = [] (3)
L553 setappend = set.append (3)
L556 if source.next == '[': (3)
L562 negate = sourcematch("^") (3)
L256 if char == self.next: (12)
L259 return False (11)
L564 while True: (9)
L565 this = sourceget() (9)
L566 if this is None: (9)
L569 if this == "]" and set: (9)
L571 elif this[0] == "\\": (6)
L574 if set and this in '-&~|' and source.next == this: (1)
L585 code1 = LITERAL, _ord(this) (1)
L586 if sourcematch("-"): (6)
L257 self.__next() (1)
L258 return True (1)
L588 that = sourceget() (1)
L589 if that is None: (1)
L592 if that == "]": (1)
L598 if that[0] == "\\": (1)
L601 if that == '-': (1)
L608 code2 = LITERAL, _ord(that) (1)
L609 if code1[0] != LITERAL or code2[0] != LITERAL: (1)
L612 lo = code1[1] (1)
L613 hi = code2[1] (1)
L614 if hi < lo: (1)
L617 setappend((RANGE, (lo, hi))) (1)
L570 break (3)
L623 set = _uniq(set) (3)
L449 return list(dict.fromkeys(items)) (3)
L625 if _len(set) == 1 and set[0][0] is LITERAL: (3)
L632 if negate: (3)
L636 subpatternappend((IN, set)) (3)
L176 self.data.append(code) (4)
L247 index += 1 (6)
L248 try: (6)
L249 char += self.decoded_string[index] (6)
L572 code1 = _class_escape(source, this) (5)
L313 code = ESCAPES.get(escape) (5)
L314 if code: (5)
L316 code = CATEGORIES.get(escape) (5)
L317 if code and code[0] is IN: (5)
L319 try: (5)
L320 c = escape[1:2] (5)
L321 if c == "x": (5)
L327 elif c == "u" and source.istext: (5)
L333 elif c == "U" and source.istext: (5)
L341 elif c == "N" and source.istext: (5)
L353 elif c in OCTDIGITS: (5)
L361 elif c in DIGITS: (5)
L363 if len(escape) == 2: (5)
L364 if c in ASCIILETTERS: (5)
L366 return LITERAL, ord(escape[1]) (5)
L619 if code1[0] is IN: (5)
L621 setappend(code1) (5)
L638 elif this in REPEAT_CHARS: (1)
L640 here = source.tell() (1)
L641 if this == "?": (1)
L642 min, max = 0, 1 (1)
L681 if subpattern: (1)
L164 return len(self.data) (3)
L682 item = subpattern[-1:] (1)
L168 if isinstance(index, slice): (8)
L169 return SubPattern(self.state, self.data[index]) (1)
L685 if not item or item[0][0] is AT: (1)
L170 return self.data[index] (7)
L688 if item[0][0] in _REPEATCODES: (1)
L691 if item[0][0] is SUBPATTERN: (1)
L695 if sourcematch("?"): (1)
L698 elif sourcematch("+"): (1)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (1)
L172 self.data[index] = code (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L543 code = _escape(source, this, state) (1)
L373 code = CATEGORIES.get(escape) (1)
L374 if code: (1)
L375 return code (1)
L544 subpatternappend(code) (1)
L526 break # end of pattern (1)
L885 for i in range(len(subpattern))[::-1]: (5)
L886 op, av = subpattern[i] (4)
L887 if op is SUBPATTERN: (4)
L892 return subpattern (1)
L461 if not sourcematch("|"): (1)
L462 break (1)
L466 if len(items) == 1: (1)
L467 return items[0] (1)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (2)
L182 for op, av in self.data: (7)
L183 if op is BRANCH: (5)
L192 elif op is ATOMIC_GROUP: (5)
L196 elif op is SUBPATTERN: (5)
L200 elif op in _REPEATCODES: (5)
L207 elif op in _UNITCODES: (4)
L208 lo = lo + 1 (3)
L209 hi = hi + 1 (3)
L201 i, j = av[2].getwidth() (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (2)
L227 return self.width (2)
L202 lo = lo + i * av[0] (1)
L203 if av[1] == MAXREPEAT and j: (1)
L206 hi = hi + j * av[1] (1)
L210 elif op is GROUPREF: (1)
L214 elif op is GROUPREF_EXISTS: (1)
L224 elif op is SUCCESS: (1)
L519 if hi > MAXCODE: (1)
L521 if lo == 0: (1)
L525 prefix = [] (1)
L526 prefix_skip = 0 (1)
L527 charset = [] # not used (1)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (1)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (1)
L441 prefix = [] (1)
L442 prefixappend = prefix.append (1)
L443 prefix_skip = None (1)
L444 iscased = _get_iscased(flags) (1)
L432 if not flags & SRE_FLAG_IGNORECASE: (2)
L433 return None (2)
L445 for op, av in pattern.data: (1)
L446 if op is LITERAL: (1)
L450 elif op is SUBPATTERN: (1)
L465 break (1)
L468 return prefix, prefix_skip, False (1)
L532 if not prefix: (1)
L533 charset = _get_charset_prefix(pattern, flags) (1)
L471 while True: (1)
L472 if not pattern.data: (1)
L474 op, av = pattern.data[0] (1)
L475 if op is not SUBPATTERN: (1)
L476 break (1)
L482 iscased = _get_iscased(flags) (1)
L483 if op is LITERAL: (1)
L487 elif op is BRANCH: (1)
L499 elif op is IN: (1)
L500 charset = av (1)
L501 if iscased: (1)
L511 return charset (1)
L539 emit = code.append (1)
L540 emit(INFO) (1)
L541 skip = len(code); emit(0) (1)
L543 mask = 0 (1)
L544 if prefix: (1)
L548 elif charset: (1)
L549 mask = mask | SRE_INFO_CHARSET (1)
L550 emit(mask) (1)
L552 if lo < MAXCODE: (1)
L553 emit(lo) (1)
L557 emit(hi) (1)
L559 if prefix: (1)
L567 elif charset: (1)
L568 charset, hascased = _optimize_charset(charset) (1)
L243 out = [] (4)
L244 tail = [] (4)
L245 charmap = bytearray(256) (4)
L246 hascased = False (4)
L247 for op, av in charset: (11)
L248 while True: (7)
L249 try: (7)
L250 if op is LITERAL: (7)
L261 elif op is RANGE: (2)
L262 r = range(av[0], av[1]+1) (2)
L263 if fixup: # IGNORECASE and not LOCALE (2)
L276 for i in r: (54)
L277 charmap[i] = 1 (52)
L309 break (7)
L312 runs = [] (4)
L313 q = 0 (4)
L314 while True: (10)
L315 p = charmap.find(1, q) (10)
L316 if p < 0: (10)
L318 if len(runs) >= 2: (7)
L321 q = charmap.find(0, p) (6)
L322 if q < 0: (6)
L325 runs.append((p, q)) (6)
L317 break (3)
L326 if runs is not None: (4)
L328 for p, q in runs: (7)
L329 if q - p == 1: (4)
L332 out.append((RANGE, (p, q - 1))) (2)
L333 out += tail (3)
L335 if hascased or len(out) < len(charset): (3)
L338 return charset, hascased (3)
L569 assert not hascased (1)
L570 _compile_charset(charset, flags, code) (1)
L216 emit = code.append (4)
L217 for op, av in charset: (9)
L218 emit(op) (5)
L219 if op is NEGATE: (5)
L221 elif op is LITERAL: (5)
L223 elif op is RANGE or op is RANGE_UNI_IGNORE: (3)
L224 emit(av[0]) (2)
L225 emit(av[1]) (2)
L239 emit(FAILURE) (4)
L571 code[skip] = len(code) - skip (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (2)
L40 _len = len (2)
L41 LITERAL_CODES = _LITERAL_CODES (2)
L42 REPEATING_CODES = _REPEATING_CODES (2)
L43 SUCCESS_CODES = _SUCCESS_CODES (2)
L44 ASSERT_CODES = _ASSERT_CODES (2)
L45 iscased = None (2)
L46 tolower = None (2)
L47 fixes = None (2)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (2)
L56 for op, av in pattern: (7)
_parser.py (2)
L168 if isinstance(index, slice): (2)
L170 return self.data[index] (2)
L57 if op in LITERAL_CODES: (5)
L85 elif op is IN: (5)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (3)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (3)
L89 elif not hascased: (3)
L90 emit(IN) (3)
L95 skip = _len(code); emit(0) (3)
L96 _compile_charset(charset, flags, code) (3)
L97 code[skip] = _len(code) - skip (3)
L251 if fixup: # IGNORECASE and not LOCALE (5)
L260 charmap[av] = 1 (5)
L319 runs = None (1)
L320 break (1)
L341 if len(charmap) == 256: (1)
L342 data = _mk_bitmap(charmap) (1)
L390 s = bits.translate(_BITS_TRANS)[::-1] (1)
L392 for i in range(len(s), 0, -_CODEBITS)] (10)
L391 return [_int(s[i - _CODEBITS: i], 2) (10)
L343 out.append((CHARSET, data)) (1)
L344 out += tail (1)
L345 return out, hascased (1)
L226 elif op is CHARSET: (1)
L227 code.extend(av) (1)
L98 elif op is ANY: (2)
L103 elif op in REPEATING_CODES: (2)
L104 if _simple(av[2]): (1)
L403 if len(p) != 1: (1)
_parser.py (1)
L164 return len(self.data) (1)
L405 op, av = p[0] (1)
_parser.py (1)
L168 if isinstance(index, slice): (1)
L170 return self.data[index] (1)
L406 if op is SUBPATTERN: (1)
L408 return op in _UNIT_CODES (1)
L105 emit(REPEATING_CODES[op][2]) (1)
L106 skip = _len(code); emit(0) (1)
L107 emit(av[0]) (1)
L108 emit(av[1]) (1)
L109 _compile(code, av[2], flags) (1)
L330 out.append((LITERAL, p)) (2)
L222 emit(av) (2)
L110 emit(SUCCESS) (1)
L111 code[skip] = _len(code) - skip (1)
L120 elif op is SUBPATTERN: (1)
L130 elif op is ATOMIC_GROUP: (1)
L141 elif op in SUCCESS_CODES: (1)
L143 elif op in ASSERT_CODES: (1)
L158 elif op is AT: (1)
L159 emit(op) (1)
L160 if flags & SRE_FLAG_MULTILINE: (1)
L162 if flags & SRE_FLAG_LOCALE: (1)
L164 elif flags & SRE_FLAG_UNICODE: (1)
L165 av = AT_UNICODE.get(av, av) (1)
L166 emit(av) (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (1)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L113 width=70, (1)
L114 initial_indent="", (1)
L115 subsequent_indent="", (1)
L116 expand_tabs=True, (1)
L117 replace_whitespace=True, (1)
L118 fix_sentence_endings=False, (1)
L119 break_long_words=True, (1)
L120 drop_whitespace=True, (1)
L121 break_on_hyphens=True, (1)
L122 tabsize=8, (1)
L112 def __init__(self, (2)
L124 max_lines=None, (1)
L125 placeholder=' [...]'): (1)
L143 def _munge_whitespace(self, text): (1)
L157 def _split(self, text): (1)
L179 def _fix_sentence_endings(self, chunks): (1)
L197 def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width): (1)
L238 def _wrap_chunks(self, chunks): (1)
L341 def _split_chunks(self, text): (1)
L347 def wrap(self, text): (1)
L361 def fill(self, text): (1)
L373 def wrap(text, width=70, **kwargs): (1)
L386 def fill(text, width=70, **kwargs): (1)
L398 def shorten(text, width, **kwargs): (1)
L416 _whitespace_only_re = re.compile('^[ \t]+$', re.MULTILINE) (1)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L333 flags = flags.value (1)
enum.py (1)
L200 if instance is None: (1)
L207 if self.fget is not None: (1)
L209 return self.fget(instance) (1)
L1340 return self._value_ (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (8)
L241 try: (8)
L242 char = self.decoded_string[index] (8)
L246 if char == "\\": (7)
L253 self.index = index + 1 (7)
L254 self.next = char (7)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (1)
L455 itemsappend = items.append (1)
L456 sourcematch = source.match (1)
L457 start = source.tell() (1)
L293 return self.index - len(self.next or '') (3)
L458 while True: (1)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (2)
L460 not nested and not items)) (1)
L513 subpattern = SubPattern(state) (1)
L113 self.state = state (2)
L114 if data is None: (2)
L115 data = [] (1)
L116 self.data = data (2)
L117 self.width = None (2)
L516 subpatternappend = subpattern.append (1)
L517 sourceget = source.get (1)
L518 sourcematch = source.match (1)
L519 _len = len (1)
L520 _ord = ord (1)
L522 while True: (5)
L524 this = source.next (5)
L525 if this is None: (5)
L527 if this in "|)": (4)
L529 sourceget() (4)
L261 this = self.next (7)
L262 self.__next() (7)
L263 return this (7)
L531 if verbose: (4)
L542 if this[0] == "\\": (4)
L546 elif this not in SPECIAL_CHARS: (4)
L549 elif this == "[": (4)
L638 elif this in REPEAT_CHARS: (3)
L705 elif this == ".": (2)
L708 elif this == "(": (2)
L875 elif this == "^": (2)
L876 subpatternappend((AT, AT_BEGINNING)) (1)
L176 self.data.append(code) (3)
L550 here = source.tell() - 1 (1)
L552 set = [] (1)
L553 setappend = set.append (1)
L556 if source.next == '[': (1)
L562 negate = sourcematch("^") (1)
L256 if char == self.next: (6)
L259 return False (6)
L564 while True: (3)
L565 this = sourceget() (3)
L566 if this is None: (3)
L569 if this == "]" and set: (3)
L571 elif this[0] == "\\": (2)
L574 if set and this in '-&~|' and source.next == this: (2)
L585 code1 = LITERAL, _ord(this) (2)
L586 if sourcematch("-"): (2)
L619 if code1[0] is IN: (2)
L621 setappend(code1) (2)
L570 break (1)
L623 set = _uniq(set) (1)
L449 return list(dict.fromkeys(items)) (1)
L625 if _len(set) == 1 and set[0][0] is LITERAL: (1)
L632 if negate: (1)
L636 subpatternappend((IN, set)) (1)
L640 here = source.tell() (1)
L641 if this == "?": (1)
L643 elif this == "*": (1)
L646 elif this == "+": (1)
L647 min, max = 1, MAXREPEAT (1)
L681 if subpattern: (1)
L164 return len(self.data) (3)
L682 item = subpattern[-1:] (1)
L168 if isinstance(index, slice): (7)
L169 return SubPattern(self.state, self.data[index]) (1)
L685 if not item or item[0][0] is AT: (1)
L170 return self.data[index] (6)
L688 if item[0][0] in _REPEATCODES: (1)
L691 if item[0][0] is SUBPATTERN: (1)
L695 if sourcematch("?"): (1)
L698 elif sourcematch("+"): (1)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (1)
L172 self.data[index] = code (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L878 elif this == "$": (1)
L879 subpatternappend((AT, AT_END)) (1)
L526 break # end of pattern (1)
L885 for i in range(len(subpattern))[::-1]: (4)
L886 op, av = subpattern[i] (3)
L887 if op is SUBPATTERN: (3)
L892 return subpattern (1)
L461 if not sourcematch("|"): (1)
L462 break (1)
L466 if len(items) == 1: (1)
L467 return items[0] (1)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (2)
L182 for op, av in self.data: (6)
L183 if op is BRANCH: (4)
L192 elif op is ATOMIC_GROUP: (4)
L196 elif op is SUBPATTERN: (4)
L200 elif op in _REPEATCODES: (4)
L207 elif op in _UNITCODES: (3)
L210 elif op is GROUPREF: (2)
L214 elif op is GROUPREF_EXISTS: (2)
L224 elif op is SUCCESS: (2)
L201 i, j = av[2].getwidth() (1)
L208 lo = lo + 1 (1)
L209 hi = hi + 1 (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (2)
L227 return self.width (2)
L202 lo = lo + i * av[0] (1)
L203 if av[1] == MAXREPEAT and j: (1)
L204 hi = MAXWIDTH (1)
L519 if hi > MAXCODE: (1)
L520 hi = MAXCODE (1)
L521 if lo == 0: (1)
L525 prefix = [] (1)
L526 prefix_skip = 0 (1)
L527 charset = [] # not used (1)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (1)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (1)
L441 prefix = [] (1)
L442 prefixappend = prefix.append (1)
L443 prefix_skip = None (1)
L444 iscased = _get_iscased(flags) (1)
L432 if not flags & SRE_FLAG_IGNORECASE: (2)
L433 return None (2)
L445 for op, av in pattern.data: (1)
L446 if op is LITERAL: (1)
L450 elif op is SUBPATTERN: (1)
L465 break (1)
L468 return prefix, prefix_skip, False (1)
L532 if not prefix: (1)
L533 charset = _get_charset_prefix(pattern, flags) (1)
L471 while True: (1)
L472 if not pattern.data: (1)
L474 op, av = pattern.data[0] (1)
L475 if op is not SUBPATTERN: (1)
L476 break (1)
L482 iscased = _get_iscased(flags) (1)
L483 if op is LITERAL: (1)
L487 elif op is BRANCH: (1)
L499 elif op is IN: (1)
L512 return None (1)
L539 emit = code.append (1)
L540 emit(INFO) (1)
L541 skip = len(code); emit(0) (1)
L543 mask = 0 (1)
L544 if prefix: (1)
L548 elif charset: (1)
L550 emit(mask) (1)
L552 if lo < MAXCODE: (1)
L553 emit(lo) (1)
L557 emit(hi) (1)
L559 if prefix: (1)
L567 elif charset: (1)
L571 code[skip] = len(code) - skip (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (2)
L40 _len = len (2)
L41 LITERAL_CODES = _LITERAL_CODES (2)
L42 REPEATING_CODES = _REPEATING_CODES (2)
L43 SUCCESS_CODES = _SUCCESS_CODES (2)
L44 ASSERT_CODES = _ASSERT_CODES (2)
L45 iscased = None (2)
L46 tolower = None (2)
L47 fixes = None (2)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (2)
L56 for op, av in pattern: (6)
_parser.py (2)
L168 if isinstance(index, slice): (2)
L170 return self.data[index] (2)
L57 if op in LITERAL_CODES: (4)
L85 elif op is IN: (4)
L98 elif op is ANY: (3)
L103 elif op in REPEATING_CODES: (3)
L120 elif op is SUBPATTERN: (2)
L130 elif op is ATOMIC_GROUP: (2)
L141 elif op in SUCCESS_CODES: (2)
L143 elif op in ASSERT_CODES: (2)
L158 elif op is AT: (2)
L159 emit(op) (2)
L160 if flags & SRE_FLAG_MULTILINE: (2)
L161 av = AT_MULTILINE.get(av, av) (2)
L162 if flags & SRE_FLAG_LOCALE: (2)
L164 elif flags & SRE_FLAG_UNICODE: (2)
L165 av = AT_UNICODE.get(av, av) (2)
L166 emit(av) (2)
L104 if _simple(av[2]): (1)
L403 if len(p) != 1: (1)
_parser.py (1)
L164 return len(self.data) (1)
L405 op, av = p[0] (1)
_parser.py (1)
L168 if isinstance(index, slice): (1)
L170 return self.data[index] (1)
L406 if op is SUBPATTERN: (1)
L408 return op in _UNIT_CODES (1)
L105 emit(REPEATING_CODES[op][2]) (1)
L106 skip = _len(code); emit(0) (1)
L107 emit(av[0]) (1)
L108 emit(av[1]) (1)
L109 _compile(code, av[2], flags) (1)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (1)
L243 out = [] (1)
L244 tail = [] (1)
L245 charmap = bytearray(256) (1)
L246 hascased = False (1)
L247 for op, av in charset: (3)
L248 while True: (2)
L249 try: (2)
L250 if op is LITERAL: (2)
L251 if fixup: # IGNORECASE and not LOCALE (2)
L260 charmap[av] = 1 (2)
L309 break (2)
L312 runs = [] (1)
L313 q = 0 (1)
L314 while True: (3)
L315 p = charmap.find(1, q) (3)
L316 if p < 0: (3)
L318 if len(runs) >= 2: (2)
L321 q = charmap.find(0, p) (2)
L322 if q < 0: (2)
L325 runs.append((p, q)) (2)
L317 break (1)
L326 if runs is not None: (1)
L328 for p, q in runs: (3)
L329 if q - p == 1: (2)
L330 out.append((LITERAL, p)) (2)
L333 out += tail (1)
L335 if hascased or len(out) < len(charset): (1)
L338 return charset, hascased (1)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (1)
L89 elif not hascased: (1)
L90 emit(IN) (1)
L95 skip = _len(code); emit(0) (1)
L96 _compile_charset(charset, flags, code) (1)
L216 emit = code.append (1)
L217 for op, av in charset: (3)
L218 emit(op) (2)
L219 if op is NEGATE: (2)
L221 elif op is LITERAL: (2)
L222 emit(av) (2)
L239 emit(FAILURE) (1)
L97 code[skip] = _len(code) - skip (1)
L110 emit(SUCCESS) (1)
L111 code[skip] = _len(code) - skip (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (1)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L417 _leading_whitespace_re = re.compile('(^[ \t]*)(?:[^ \t\n])', re.MULTILINE) (1)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L333 flags = flags.value (1)
enum.py (1)
L200 if instance is None: (1)
L207 if self.fget is not None: (1)
L209 return self.fget(instance) (1)
L1340 return self._value_ (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (19)
L241 try: (19)
L242 char = self.decoded_string[index] (19)
L246 if char == "\\": (18)
L253 self.index = index + 1 (18)
L254 self.next = char (18)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (3)
L455 itemsappend = items.append (3)
L456 sourcematch = source.match (3)
L457 start = source.tell() (3)
L293 return self.index - len(self.next or '') (8)
L458 while True: (3)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (6)
L460 not nested and not items)) (3)
L513 subpattern = SubPattern(state) (3)
L113 self.state = state (4)
L114 if data is None: (4)
L115 data = [] (3)
L116 self.data = data (4)
L117 self.width = None (4)
L516 subpatternappend = subpattern.append (3)
L517 sourceget = source.get (3)
L518 sourcematch = source.match (3)
L519 _len = len (3)
L520 _ord = ord (3)
L522 while True: (9)
L524 this = source.next (9)
L525 if this is None: (9)
L527 if this in "|)": (8)
L529 sourceget() (6)
L261 this = self.next (14)
L262 self.__next() (14)
L263 return this (14)
L531 if verbose: (6)
L542 if this[0] == "\\": (6)
L546 elif this not in SPECIAL_CHARS: (6)
L549 elif this == "[": (6)
L638 elif this in REPEAT_CHARS: (4)
L705 elif this == ".": (3)
L708 elif this == "(": (3)
L709 start = source.tell() - 1 (2)
L710 capture = True (2)
L711 atomic = False (2)
L712 name = None (2)
L713 add_flags = 0 (2)
L714 del_flags = 0 (2)
L715 if sourcematch("?"): (2)
L256 if char == self.next: (16)
L259 return False (12)
L854 if capture: (2)
L855 try: (1)
L856 group = state.opengroup(name) (1)
L86 gid = self.groups (1)
L84 return len(self.groupwidths) (2)
L87 self.groupwidths.append(None) (1)
L88 if self.groups > MAXGROUPS: (1)
L90 if name is not None: (1)
L96 return gid (1)
L861 sub_verbose = ((verbose or (add_flags & SRE_FLAG_VERBOSE)) and (2)
L863 p = _parse_sub(source, state, sub_verbose, nested + 1) (2)
L875 elif this == "^": (1)
L876 subpatternappend((AT, AT_BEGINNING)) (1)
L176 self.data.append(code) (5)
L550 here = source.tell() - 1 (2)
L552 set = [] (2)
L553 setappend = set.append (2)
L556 if source.next == '[': (2)
L562 negate = sourcematch("^") (2)
L564 while True: (7)
L565 this = sourceget() (7)
L566 if this is None: (7)
L569 if this == "]" and set: (7)
L571 elif this[0] == "\\": (5)
L574 if set and this in '-&~|' and source.next == this: (5)
L585 code1 = LITERAL, _ord(this) (5)
L586 if sourcematch("-"): (5)
L619 if code1[0] is IN: (5)
L621 setappend(code1) (5)
L570 break (2)
L623 set = _uniq(set) (2)
L449 return list(dict.fromkeys(items)) (2)
L625 if _len(set) == 1 and set[0][0] is LITERAL: (2)
L632 if negate: (2)
L636 subpatternappend((IN, set)) (2)
L640 here = source.tell() (1)
L641 if this == "?": (1)
L643 elif this == "*": (1)
L644 min, max = 0, MAXREPEAT (1)
L681 if subpattern: (1)
L164 return len(self.data) (6)
L682 item = subpattern[-1:] (1)
L168 if isinstance(index, slice): (11)
L169 return SubPattern(self.state, self.data[index]) (1)
L685 if not item or item[0][0] is AT: (1)
L170 return self.data[index] (10)
L688 if item[0][0] in _REPEATCODES: (1)
L691 if item[0][0] is SUBPATTERN: (1)
L695 if sourcematch("?"): (1)
L698 elif sourcematch("+"): (1)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (1)
L172 self.data[index] = code (2)
L528 break # end of subpattern (2)
L885 for i in range(len(subpattern))[::-1]: (8)
L886 op, av = subpattern[i] (5)
L887 if op is SUBPATTERN: (5)
L892 return subpattern (3)
L461 if not sourcematch("|"): (3)
L462 break (3)
L466 if len(items) == 1: (3)
L467 return items[0] (3)
L864 if not source.match(")"): (2)
L257 self.__next() (4)
L258 return True (4)
L867 if group is not None: (2)
L868 state.closegroup(group, p) (1)
L98 self.groupwidths[gid] = p.getwidth() (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (2)
L182 for op, av in self.data: (5)
L183 if op is BRANCH: (3)
L192 elif op is ATOMIC_GROUP: (3)
L196 elif op is SUBPATTERN: (3)
L200 elif op in _REPEATCODES: (3)
L207 elif op in _UNITCODES: (2)
L210 elif op is GROUPREF: (1)
L214 elif op is GROUPREF_EXISTS: (1)
L224 elif op is SUCCESS: (1)
L201 i, j = av[2].getwidth() (1)
L208 lo = lo + 1 (1)
L209 hi = hi + 1 (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (2)
L227 return self.width (2)
L202 lo = lo + i * av[0] (1)
L203 if av[1] == MAXREPEAT and j: (1)
L204 hi = MAXWIDTH (1)
L869 if atomic: (2)
L873 subpatternappend((SUBPATTERN, (group, add_flags, del_flags, p))) (2)
L717 char = sourceget() (1)
L718 if char is None: (1)
L720 if char == "P": (1)
L747 elif char == ":": (1)
L749 capture = False (1)
L860 group = None (1)
L633 set.insert(0, (NEGATE, None)) (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L526 break # end of pattern (1)
L888 group, add_flags, del_flags, p = av (2)
L889 if group is None and not add_flags and not del_flags: (2)
L890 subpattern[i: i+1] = p (1)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (1)
L182 for op, av in self.data: (3)
L183 if op is BRANCH: (2)
L192 elif op is ATOMIC_GROUP: (2)
L196 elif op is SUBPATTERN: (2)
L197 i, j = av[-1].getwidth() (1)
L180 return self.width (1)
L198 lo = lo + i (1)
L199 hi = hi + j (1)
L200 elif op in _REPEATCODES: (1)
L207 elif op in _UNITCODES: (1)
L208 lo = lo + 1 (1)
L209 hi = hi + 1 (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (1)
L227 return self.width (1)
L519 if hi > MAXCODE: (1)
L520 hi = MAXCODE (1)
L521 if lo == 0: (1)
L525 prefix = [] (1)
L526 prefix_skip = 0 (1)
L527 charset = [] # not used (1)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (1)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (1)
L441 prefix = [] (2)
L442 prefixappend = prefix.append (2)
L443 prefix_skip = None (2)
L444 iscased = _get_iscased(flags) (2)
L432 if not flags & SRE_FLAG_IGNORECASE: (3)
L433 return None (3)
L445 for op, av in pattern.data: (2)
L446 if op is LITERAL: (2)
L450 elif op is SUBPATTERN: (2)
L451 group, add_flags, del_flags, p = av (1)
L452 flags1 = _combine_flags(flags, add_flags, del_flags) (1)
L33 if add_flags & TYPE_FLAGS: (3)
L35 return (flags | add_flags) & ~del_flags (3)
L453 if flags1 & SRE_FLAG_IGNORECASE and flags1 & SRE_FLAG_LOCALE: (1)
L455 prefix1, prefix_skip1, got_all = _get_literal_prefix(p, flags1) (1)
L465 break (1)
L468 return prefix, prefix_skip, False (2)
L456 if prefix_skip is None: (1)
L457 if group is not None: (1)
L458 prefix_skip = len(prefix) (1)
L461 prefix.extend(prefix1) (1)
L462 if not got_all: (1)
L463 break (1)
L532 if not prefix: (1)
L533 charset = _get_charset_prefix(pattern, flags) (1)
L471 while True: (2)
L472 if not pattern.data: (2)
L474 op, av = pattern.data[0] (2)
L475 if op is not SUBPATTERN: (2)
L477 group, add_flags, del_flags, pattern = av (1)
L478 flags = _combine_flags(flags, add_flags, del_flags) (1)
L479 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (1)
L476 break (1)
L482 iscased = _get_iscased(flags) (1)
L483 if op is LITERAL: (1)
L487 elif op is BRANCH: (1)
L499 elif op is IN: (1)
L512 return None (1)
L539 emit = code.append (1)
L540 emit(INFO) (1)
L541 skip = len(code); emit(0) (1)
L543 mask = 0 (1)
L544 if prefix: (1)
L548 elif charset: (1)
L550 emit(mask) (1)
L552 if lo < MAXCODE: (1)
L553 emit(lo) (1)
L557 emit(hi) (1)
L559 if prefix: (1)
L567 elif charset: (1)
L571 code[skip] = len(code) - skip (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (3)
L40 _len = len (3)
L41 LITERAL_CODES = _LITERAL_CODES (3)
L42 REPEATING_CODES = _REPEATING_CODES (3)
L43 SUCCESS_CODES = _SUCCESS_CODES (3)
L44 ASSERT_CODES = _ASSERT_CODES (3)
L45 iscased = None (3)
L46 tolower = None (3)
L47 fixes = None (3)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (3)
L56 for op, av in pattern: (8)
_parser.py (5)
L168 if isinstance(index, slice): (5)
L170 return self.data[index] (5)
L57 if op in LITERAL_CODES: (5)
L85 elif op is IN: (5)
L98 elif op is ANY: (3)
L103 elif op in REPEATING_CODES: (3)
L120 elif op is SUBPATTERN: (2)
L121 group, add_flags, del_flags, p = av (1)
L122 if group: (1)
L123 emit(MARK) (1)
L124 emit((group-1)*2) (1)
L126 _compile(code, p, _combine_flags(flags, add_flags, del_flags)) (1)
L130 elif op is ATOMIC_GROUP: (1)
L141 elif op in SUCCESS_CODES: (1)
L143 elif op in ASSERT_CODES: (1)
L158 elif op is AT: (1)
L159 emit(op) (1)
L160 if flags & SRE_FLAG_MULTILINE: (1)
L161 av = AT_MULTILINE.get(av, av) (1)
L162 if flags & SRE_FLAG_LOCALE: (1)
L164 elif flags & SRE_FLAG_UNICODE: (1)
L165 av = AT_UNICODE.get(av, av) (1)
L166 emit(av) (1)
L104 if _simple(av[2]): (1)
L403 if len(p) != 1: (1)
_parser.py (1)
L164 return len(self.data) (1)
L405 op, av = p[0] (1)
_parser.py (1)
L168 if isinstance(index, slice): (1)
L170 return self.data[index] (1)
L406 if op is SUBPATTERN: (1)
L408 return op in _UNIT_CODES (1)
L105 emit(REPEATING_CODES[op][2]) (1)
L106 skip = _len(code); emit(0) (1)
L107 emit(av[0]) (1)
L108 emit(av[1]) (1)
L109 _compile(code, av[2], flags) (1)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (2)
L243 out = [] (2)
L244 tail = [] (2)
L245 charmap = bytearray(256) (2)
L246 hascased = False (2)
L247 for op, av in charset: (8)
L248 while True: (6)
L249 try: (6)
L250 if op is LITERAL: (6)
L251 if fixup: # IGNORECASE and not LOCALE (5)
L260 charmap[av] = 1 (5)
L309 break (6)
L312 runs = [] (2)
L313 q = 0 (2)
L314 while True: (6)
L315 p = charmap.find(1, q) (6)
L316 if p < 0: (6)
L318 if len(runs) >= 2: (4)
L321 q = charmap.find(0, p) (4)
L322 if q < 0: (4)
L325 runs.append((p, q)) (4)
L317 break (2)
L326 if runs is not None: (2)
L328 for p, q in runs: (6)
L329 if q - p == 1: (4)
L330 out.append((LITERAL, p)) (3)
L333 out += tail (2)
L335 if hascased or len(out) < len(charset): (2)
L338 return charset, hascased (1)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (2)
L89 elif not hascased: (2)
L90 emit(IN) (2)
L95 skip = _len(code); emit(0) (2)
L96 _compile_charset(charset, flags, code) (2)
L216 emit = code.append (2)
L217 for op, av in charset: (7)
L218 emit(op) (5)
L219 if op is NEGATE: (5)
L221 elif op is LITERAL: (4)
L222 emit(av) (3)
L239 emit(FAILURE) (2)
L97 code[skip] = _len(code) - skip (2)
L110 emit(SUCCESS) (1)
L111 code[skip] = _len(code) - skip (1)
L127 if group: (1)
L128 emit(MARK) (1)
L129 emit((group-1)*2+1) (1)
L261 elif op is RANGE: (1)
L278 elif op is NEGATE: (1)
L279 out.append((op, av)) (1)
L332 out.append((RANGE, (p, q - 1))) (1)
L336 return out, hascased (1)
L220 pass (1)
L223 elif op is RANGE or op is RANGE_UNI_IGNORE: (1)
L224 emit(av[0]) (1)
L225 emit(av[1]) (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (1)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L419 def dedent(text): (1)
L470 def indent(text, prefix, predicate=None): (1)
L494 if __name__ == "__main__": (1)
platform.py (1)
L3 """ This module tries to retrieve as much platform-identifying data as (1)
L93 __copyright__ = """ (1)
L114 __version__ = '1.0.8' (1)
L116 import collections (1)
L117 import os (1)
L118 import re (1)
L119 import sys (1)
L120 import functools (1)
L121 import itertools (1)
L122 try: (1)
L123 import _wmi (1)
_datasource.py (1)
L1 """A file interface for handling local and remote data files. (1)
L37 import os (1)
L39 from .._utils import set_module (1)
_iotools.py (1)
L1 """A collection of functions designed to help I/O with ascii files. (1)
L4 __docformat__ = "restructuredtext en" (1)
L6 import numpy as np (1)
scimath.py (1)
L1 from ._scimath_impl import ( (1)
_scimath_impl.py (1)
L1 """ (1)
L17 import numpy._core.numeric as nx (1)
_type_check_impl.py (1)
L1 """Automatically adapted for numpy Sep 19, 2005 by convertcode.py (1)
L4 import functools (1)
L6 __all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex', (1)
L11 from .._utils import set_module (1)
_ufunclike_impl.py (1)
L1 """ (1)
L6 __all__ = ['fix', 'isneginf', 'isposinf'] (1)
L8 import numpy._core.numeric as nx (1)
stride_tricks.py (1)
L1 from ._stride_tricks_impl import ( (1)
_stride_tricks_impl.py (1)
L1 """ (1)
L7 import numpy as np (1)
_index_tricks_impl.py (1)
L1 import functools (1)
L2 import sys (1)
L3 import math (1)
L4 import warnings (1)
L6 import numpy as np (1)
defmatrix.py (1)
L1 __all__ = ['matrix', 'bmat', 'asmatrix'] (1)
L3 import sys (1)
L4 import warnings (1)
L5 import ast (1)
L7 from .._utils import set_module (1)
linalg.py (1)
L1 def __getattr__(attr_name): (1)
_linalg.py (1)
L1 """Lite version of scipy.linalg. (1)
L12 __all__ = ['matrix_power', 'solve', 'tensorsolve', 'tensorinv', 'inv', (1)
L19 import functools (1)
L20 import operator (1)
L21 import warnings (1)
L22 from typing import NamedTuple, Any (1)
typing.py (1)
L1 """ (1)
L21 from abc import abstractmethod, ABCMeta (1)
L22 import collections (1)
L23 from collections import defaultdict (1)
_twodim_base_impl.py (1)
L1 """ Basic functions for manipulating 2d arrays (1)
L4 import functools (1)
L5 import operator (1)
L7 from numpy._core._multiarray_umath import _array_converter (1)
L8 from numpy._core.numeric import ( (1)
L13 from numpy._core.overrides import finalize_array_function_like, set_module (1)
L14 from numpy._core import overrides (1)
__future__.py (1)
L1 """Record of phased-in incompatible language changes. (1)
L50 all_feature_names = [ (1)
L63 __all__ = ["all_feature_names"] + all_feature_names (1)
L69 CO_NESTED = 0x0010 # nested_scopes (1)
L70 CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000) (1)
L71 CO_FUTURE_DIVISION = 0x20000 # division (1)
L72 CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default (1)
L73 CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement (1)
L74 CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function (1)
L75 CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals (1)
L76 CO_FUTURE_BARRY_AS_BDFL = 0x400000 (1)
L77 CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators (1)
L78 CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime (1)
L81 class _Feature: (2)
L83 def __init__(self, optionalRelease, mandatoryRelease, compiler_flag): (1)
L88 def getOptionalRelease(self): (1)
L95 def getMandatoryRelease(self): (1)
L103 def __repr__(self): (1)
L109 nested_scopes = _Feature((2, 1, 0, "beta", 1), (2)
L110 (2, 2, 0, "alpha", 0), (1)
L111 CO_NESTED) (1)
L84 self.optional = optionalRelease (10)
L85 self.mandatory = mandatoryRelease (10)
L86 self.compiler_flag = compiler_flag (10)
L113 generators = _Feature((2, 2, 0, "alpha", 1), (2)
L114 (2, 3, 0, "final", 0), (1)
L115 CO_GENERATOR_ALLOWED) (1)
L117 division = _Feature((2, 2, 0, "alpha", 2), (2)
L118 (3, 0, 0, "alpha", 0), (1)
L119 CO_FUTURE_DIVISION) (1)
L121 absolute_import = _Feature((2, 5, 0, "alpha", 1), (2)
L122 (3, 0, 0, "alpha", 0), (1)
L123 CO_FUTURE_ABSOLUTE_IMPORT) (1)
L125 with_statement = _Feature((2, 5, 0, "alpha", 1), (2)
L126 (2, 6, 0, "alpha", 0), (1)
L127 CO_FUTURE_WITH_STATEMENT) (1)
L129 print_function = _Feature((2, 6, 0, "alpha", 2), (2)
L130 (3, 0, 0, "alpha", 0), (1)
L131 CO_FUTURE_PRINT_FUNCTION) (1)
L133 unicode_literals = _Feature((2, 6, 0, "alpha", 2), (2)
L134 (3, 0, 0, "alpha", 0), (1)
L135 CO_FUTURE_UNICODE_LITERALS) (1)
L137 barry_as_FLUFL = _Feature((3, 1, 0, "alpha", 2), (2)
L138 (4, 0, 0, "alpha", 0), (1)
L139 CO_FUTURE_BARRY_AS_BDFL) (1)
L141 generator_stop = _Feature((3, 5, 0, "beta", 1), (2)
L142 (3, 7, 0, "alpha", 0), (1)
L143 CO_FUTURE_GENERATOR_STOP) (1)
L145 annotations = _Feature((3, 7, 0, "beta", 1), (2)
L146 None, (1)
L147 CO_FUTURE_ANNOTATIONS) (1)
_nested_sequence.py (1)
L1 """A module containing the `_NestedSequence` protocol.""" (1)
L3 from __future__ import annotations (1)
L5 from typing import ( (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L13 if TYPE_CHECKING: (1)
L16 __all__ = ["_NestedSequence"] (1)
L18 _T_co = TypeVar("_T_co", covariant=True) (1)
L21 @runtime_checkable (3)
typing.py (1)
L2348 if not issubclass(cls, Generic) or not getattr(cls, '_is_protocol', False): (1)
L2351 cls._is_runtime_protocol = True (1)
L2356 cls.__non_callable_proto_members__ = set() (1)
L2357 for attr in cls.__protocol_attrs__: (8)
L2358 try: (7)
L2359 is_callable = callable(getattr(cls, attr, None)) (7)
L2366 if not is_callable: (7)
L2368 return cls (1)
L22 class _NestedSequence(Protocol[_T_co]): (2)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1226 if not args: (1)
L1230 if not all(_is_typevar_like(p) for p in args): (3)
L1128 return isinstance(x, (TypeVar, ParamSpec)) or _is_unpacked_typevartuple(x) (1)
L1234 if len(set(args)) != len(args): (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L288 if t not in parameters: (1)
L289 if enforce_default_ordering: (1)
L290 if type_var_tuple_encountered and t.has_default(): (1)
L294 if t.has_default(): (1)
L296 elif default_encountered: (1)
L300 parameters.append(t) (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L1600 if isinstance(self.__origin__, _SpecialForm): (1)
L1603 if self._name: # generic version of an ABC or built-in class (1)
L1605 if self.__origin__ is Generic: (1)
L1612 return (self.__origin__,) (1)
L23 """A protocol for representing nested sequences. (1)
L63 def __len__(self, /) -> int: (1)
L67 def __getitem__(self, index: int, /) -> _T_co | _NestedSequence[_T_co]: (1)
L71 def __contains__(self, x: object, /) -> bool: (1)
L75 def __iter__(self, /) -> Iterator[_T_co | _NestedSequence[_T_co]]: (1)
L79 def __reversed__(self, /) -> Iterator[_T_co | _NestedSequence[_T_co]]: (1)
L83 def count(self, value: Any, /) -> int: (1)
L87 def index(self, value: Any, /) -> int: (1)
typing.py (1)
L2055 if name == "Protocol" and bases == (Generic,): (1)
L2057 elif Protocol in bases: (1)
L2058 for base in bases: (2)
L2060 base in {object, Generic} (1)
L2061 or base.__name__ in _PROTO_ALLOWLIST.get(base.__module__, []) (1)
L2063 issubclass(base, Generic) (1)
L2064 and getattr(base, "_is_protocol", False) (1)
L2071 return super().__new__(mcls, name, bases, namespace, **kwargs) (1)
<frozen abc> (1)
L106 (1)
L2200 super().__init_subclass__(*args, **kwargs) (1)
L1257 super(Generic, cls).__init_subclass__(*args, **kwargs) (1)
L1258 tvars = [] (1)
L1259 if '__orig_bases__' in cls.__dict__: (1)
L1260 error = Generic in cls.__orig_bases__ (1)
L1438 if not isinstance(other, _GenericAlias): (1)
L1439 return NotImplemented (1)
L1265 if error: (1)
L1267 if '__orig_bases__' in cls.__dict__: (1)
L1268 tvars = _collect_type_parameters(cls.__orig_bases__) (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1295 return attr.startswith('__') and attr.endswith('__') (2)
L1366 raise AttributeError(attr) (2)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (2)
L305 if x not in parameters: (1)
L306 parameters.append(x) (1)
L307 return tuple(parameters) (1)
L1274 gvars = None (1)
L1275 for base in cls.__orig_bases__: (2)
L1276 if (isinstance(base, _GenericAlias) and (1)
L1277 base.__origin__ is Generic): (1)
L1282 if gvars is not None: (1)
L1291 cls.__parameters__ = tuple(tvars) (1)
L2203 if not cls.__dict__.get('_is_protocol', False): (1)
L2204 cls._is_protocol = any(b is Protocol for b in cls.__bases__) (2)
L2207 if '__subclasshook__' not in cls.__dict__: (1)
L2208 cls.__subclasshook__ = _proto_hook (1)
L2211 if cls._is_protocol and cls.__init__ is Protocol.__init__: (1)
L2212 cls.__init__ = _no_init_or_replace_init (1)
<frozen abc> (1)
L107 (1)
L108 (1)
L2074 super().__init__(*args, **kwargs) (1)
L2075 if getattr(cls, "_is_protocol", False): (1)
L2076 cls.__protocol_attrs__ = _get_protocol_attrs(cls) (1)
L1933 attrs = set() (1)
L1934 for base in cls.__mro__[:-1]: # without object (4)
L1935 if base.__name__ in {'Protocol', 'Generic'}: (3)
L1937 annotations = getattr(base, '__annotations__', {}) (1)
L1938 for attr in (*base.__dict__, *annotations): (22)
L1939 if not attr.startswith('_abc_') and attr not in EXCLUDED_ATTRIBUTES: (21)
L1940 attrs.add(attr) (7)
L1936 continue (2)
L1941 return attrs (1)
_nbit_base.py (1)
L1 """A module with the precisions of generic `~numpy.number` types.""" (1)
L2 from .._utils import set_module (1)
_nbit.py (1)
L1 """A module with the precisions of platform-specific `~numpy.number`s.""" (1)
L3 from typing import TypeAlias (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L4 from ._nbit_base import _8Bit, _16Bit, _32Bit, _64Bit, _96Bit, _128Bit (1)
_char_codes.py (1)
L1 from typing import Literal (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L3 _BoolCodes = Literal["bool", "bool_", "?", "|?", "=?", "<?", ">?"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (8)
L399 if isinstance(p, _LiteralGenericAlias): (7)
L402 params.append(p) (7)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (9)
L1803 return ((p, type(p)) for p in parameters) (9)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (17)
L1428 a for a in args) (16)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (8)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L5 _UInt8Codes = Literal["uint8", "u1", "|u1", "=u1", "<u1", ">u1"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L6 _UInt16Codes = Literal["uint16", "u2", "|u2", "=u2", "<u2", ">u2"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L7 _UInt32Codes = Literal["uint32", "u4", "|u4", "=u4", "<u4", ">u4"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L8 _UInt64Codes = Literal["uint64", "u8", "|u8", "=u8", "<u8", ">u8"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L10 _Int8Codes = Literal["int8", "i1", "|i1", "=i1", "<i1", ">i1"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L11 _Int16Codes = Literal["int16", "i2", "|i2", "=i2", "<i2", ">i2"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L12 _Int32Codes = Literal["int32", "i4", "|i4", "=i4", "<i4", ">i4"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L13 _Int64Codes = Literal["int64", "i8", "|i8", "=i8", "<i8", ">i8"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L15 _Float16Codes = Literal["float16", "f2", "|f2", "=f2", "<f2", ">f2"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L16 _Float32Codes = Literal["float32", "f4", "|f4", "=f4", "<f4", ">f4"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L17 _Float64Codes = Literal["float64", "f8", "|f8", "=f8", "<f8", ">f8"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L19 _Complex64Codes = Literal["complex64", "c8", "|c8", "=c8", "<c8", ">c8"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L20 _Complex128Codes = Literal["complex128", "c16", "|c16", "=c16", "<c16", ">c16"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L22 _ByteCodes = Literal["byte", "b", "|b", "=b", "<b", ">b"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L23 _ShortCodes = Literal["short", "h", "|h", "=h", "<h", ">h"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L24 _IntCCodes = Literal["intc", "i", "|i", "=i", "<i", ">i"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L25 _IntPCodes = Literal["intp", "int", "int_", "n", "|n", "=n", "<n", ">n"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (9)
L399 if isinstance(p, _LiteralGenericAlias): (8)
L402 params.append(p) (8)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (10)
L1803 return ((p, type(p)) for p in parameters) (10)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (19)
L1428 a for a in args) (18)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (9)
L277 if isinstance(t, type): (8)
L280 elif isinstance(t, tuple): (8)
L287 elif hasattr(t, '__typing_subst__'): (8)
L302 if _is_unpacked_typevartuple(t): (8)
L1123 return ((not isinstance(x, type)) and (16)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (8)
L304 for x in getattr(t, '__parameters__', ()): (8)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L26 _LongCodes = Literal["long", "l", "|l", "=l", "<l", ">l"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L27 _IntCodes = _IntPCodes (1)
L28 _LongLongCodes = Literal["longlong", "q", "|q", "=q", "<q", ">q"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L30 _UByteCodes = Literal["ubyte", "B", "|B", "=B", "<B", ">B"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L31 _UShortCodes = Literal["ushort", "H", "|H", "=H", "<H", ">H"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L32 _UIntCCodes = Literal["uintc", "I", "|I", "=I", "<I", ">I"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L33 _UIntPCodes = Literal["uintp", "uint", "N", "|N", "=N", "<N", ">N"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (8)
L399 if isinstance(p, _LiteralGenericAlias): (7)
L402 params.append(p) (7)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (9)
L1803 return ((p, type(p)) for p in parameters) (9)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (17)
L1428 a for a in args) (16)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (8)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L34 _ULongCodes = Literal["ulong", "L", "|L", "=L", "<L", ">L"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L35 _UIntCodes = _UIntPCodes (1)
L36 _ULongLongCodes = Literal["ulonglong", "Q", "|Q", "=Q", "<Q", ">Q"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L38 _HalfCodes = Literal["half", "e", "|e", "=e", "<e", ">e"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L39 _SingleCodes = Literal["single", "f", "|f", "=f", "<f", ">f"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L40 _DoubleCodes = Literal["double", "float", "d", "|d", "=d", "<d", ">d"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (8)
L399 if isinstance(p, _LiteralGenericAlias): (7)
L402 params.append(p) (7)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (9)
L1803 return ((p, type(p)) for p in parameters) (9)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (17)
L1428 a for a in args) (16)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (8)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L41 _LongDoubleCodes = Literal["longdouble", "g", "|g", "=g", "<g", ">g"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L43 _CSingleCodes = Literal["csingle", "F", "|F", "=F", "<F", ">F"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L44 _CDoubleCodes = Literal["cdouble", "complex", "D", "|D", "=D", "<D", ">D"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (8)
L399 if isinstance(p, _LiteralGenericAlias): (7)
L402 params.append(p) (7)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (9)
L1803 return ((p, type(p)) for p in parameters) (9)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (17)
L1428 a for a in args) (16)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (8)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L45 _CLongDoubleCodes = Literal["clongdouble", "G", "|G", "=G", "<G", ">G"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L47 _StrCodes = Literal["str", "str_", "unicode", "U", "|U", "=U", "<U", ">U"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (9)
L399 if isinstance(p, _LiteralGenericAlias): (8)
L402 params.append(p) (8)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (10)
L1803 return ((p, type(p)) for p in parameters) (10)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (19)
L1428 a for a in args) (18)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (9)
L277 if isinstance(t, type): (8)
L280 elif isinstance(t, tuple): (8)
L287 elif hasattr(t, '__typing_subst__'): (8)
L302 if _is_unpacked_typevartuple(t): (8)
L1123 return ((not isinstance(x, type)) and (16)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (8)
L304 for x in getattr(t, '__parameters__', ()): (8)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L48 _BytesCodes = Literal["bytes", "bytes_", "S", "|S", "=S", "<S", ">S"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (8)
L399 if isinstance(p, _LiteralGenericAlias): (7)
L402 params.append(p) (7)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (9)
L1803 return ((p, type(p)) for p in parameters) (9)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (17)
L1428 a for a in args) (16)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (8)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L49 _VoidCodes = Literal["void", "V", "|V", "=V", "<V", ">V"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L402 params.append(p) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (8)
L1803 return ((p, type(p)) for p in parameters) (8)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (15)
L1428 a for a in args) (14)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (7)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L1123 return ((not isinstance(x, type)) and (12)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L50 _ObjectCodes = Literal["object", "object_", "O", "|O", "=O", "<O", ">O"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (8)
L399 if isinstance(p, _LiteralGenericAlias): (7)
L402 params.append(p) (7)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (9)
L1803 return ((p, type(p)) for p in parameters) (9)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (17)
L1428 a for a in args) (16)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (8)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L52 _DT64Codes = Literal[ (2)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (146)
L399 if isinstance(p, _LiteralGenericAlias): (145)
L402 params.append(p) (145)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (147)
L1803 return ((p, type(p)) for p in parameters) (147)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (293)
L1428 a for a in args) (292)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (146)
L277 if isinstance(t, type): (145)
L280 elif isinstance(t, tuple): (145)
L287 elif hasattr(t, '__typing_subst__'): (145)
L302 if _is_unpacked_typevartuple(t): (145)
L1123 return ((not isinstance(x, type)) and (290)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (145)
L304 for x in getattr(t, '__parameters__', ()): (145)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L53 "datetime64", "|datetime64", "=datetime64", (1)
L97 _TD64Codes = Literal[ (2)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (146)
L399 if isinstance(p, _LiteralGenericAlias): (145)
L402 params.append(p) (145)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (147)
L1803 return ((p, type(p)) for p in parameters) (147)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (293)
L1428 a for a in args) (292)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (146)
L277 if isinstance(t, type): (145)
L280 elif isinstance(t, tuple): (145)
L287 elif hasattr(t, '__typing_subst__'): (145)
L302 if _is_unpacked_typevartuple(t): (145)
L1123 return ((not isinstance(x, type)) and (290)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (145)
L304 for x in getattr(t, '__parameters__', ()): (145)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L98 "timedelta64", "|timedelta64", "=timedelta64", (1)
L145 _StringCodes = Literal["T", "|T", "=T", "<T", ">T"] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (6)
L399 if isinstance(p, _LiteralGenericAlias): (5)
L402 params.append(p) (5)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (7)
L1803 return ((p, type(p)) for p in parameters) (7)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (13)
L1428 a for a in args) (12)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (6)
L277 if isinstance(t, type): (5)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L1123 return ((not isinstance(x, type)) and (10)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L153 _UnsignedIntegerCodes = Literal[ (2)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (10)
L1803 return ((p, type(p)) for p in parameters) (144)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (11)
L399 if isinstance(p, _LiteralGenericAlias): (10)
L400 params.extend(p.__args__) (10)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (63)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (125)
L1428 a for a in args) (124)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (62)
L277 if isinstance(t, type): (61)
L280 elif isinstance(t, tuple): (61)
L287 elif hasattr(t, '__typing_subst__'): (61)
L302 if _is_unpacked_typevartuple(t): (61)
L1123 return ((not isinstance(x, type)) and (122)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (61)
L304 for x in getattr(t, '__parameters__', ()): (61)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L154 _UInt8Codes, (2)
L155 _UInt16Codes, (1)
L156 _UInt32Codes, (1)
L157 _UInt64Codes, (1)
L158 _UIntCodes, (1)
L159 _UByteCodes, (1)
L160 _UShortCodes, (1)
L161 _UIntCCodes, (1)
L162 _ULongCodes, (1)
L163 _ULongLongCodes, (1)
L165 _SignedIntegerCodes = Literal[ (2)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (10)
L1803 return ((p, type(p)) for p in parameters) (146)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (11)
L399 if isinstance(p, _LiteralGenericAlias): (10)
L400 params.extend(p.__args__) (10)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (64)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (127)
L1428 a for a in args) (126)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (63)
L277 if isinstance(t, type): (62)
L280 elif isinstance(t, tuple): (62)
L287 elif hasattr(t, '__typing_subst__'): (62)
L302 if _is_unpacked_typevartuple(t): (62)
L1123 return ((not isinstance(x, type)) and (124)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (62)
L304 for x in getattr(t, '__parameters__', ()): (62)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L166 _Int8Codes, (2)
L167 _Int16Codes, (1)
L168 _Int32Codes, (1)
L169 _Int64Codes, (1)
L170 _IntCodes, (1)
L171 _ByteCodes, (1)
L172 _ShortCodes, (1)
L173 _IntCCodes, (1)
L174 _LongCodes, (1)
L175 _LongLongCodes, (1)
L177 _FloatingCodes = Literal[ (2)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (8)
L1803 return ((p, type(p)) for p in parameters) (116)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (9)
L399 if isinstance(p, _LiteralGenericAlias): (8)
L400 params.extend(p.__args__) (8)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (45)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (89)
L1428 a for a in args) (88)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (44)
L277 if isinstance(t, type): (43)
L280 elif isinstance(t, tuple): (43)
L287 elif hasattr(t, '__typing_subst__'): (43)
L302 if _is_unpacked_typevartuple(t): (43)
L1123 return ((not isinstance(x, type)) and (86)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (43)
L304 for x in getattr(t, '__parameters__', ()): (43)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L178 _Float16Codes, (2)
L179 _Float32Codes, (1)
L180 _Float64Codes, (1)
L181 _LongDoubleCodes, (1)
L182 _HalfCodes, (1)
L183 _SingleCodes, (1)
L184 _DoubleCodes, (1)
L185 _LongDoubleCodes (1)
L187 _ComplexFloatingCodes = Literal[ (2)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (5)
L1803 return ((p, type(p)) for p in parameters) (74)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (6)
L399 if isinstance(p, _LiteralGenericAlias): (5)
L400 params.extend(p.__args__) (5)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (33)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (65)
L1428 a for a in args) (64)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (32)
L277 if isinstance(t, type): (31)
L280 elif isinstance(t, tuple): (31)
L287 elif hasattr(t, '__typing_subst__'): (31)
L302 if _is_unpacked_typevartuple(t): (31)
L1123 return ((not isinstance(x, type)) and (62)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (31)
L304 for x in getattr(t, '__parameters__', ()): (31)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L188 _Complex64Codes, (2)
L189 _Complex128Codes, (1)
L190 _CSingleCodes, (1)
L191 _CDoubleCodes, (1)
L192 _CLongDoubleCodes, (1)
L194 _IntegerCodes = Literal[_UnsignedIntegerCodes, _SignedIntegerCodes] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (252)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (3)
L399 if isinstance(p, _LiteralGenericAlias): (2)
L400 params.extend(p.__args__) (2)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (125)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (249)
L1428 a for a in args) (248)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (124)
L277 if isinstance(t, type): (123)
L280 elif isinstance(t, tuple): (123)
L287 elif hasattr(t, '__typing_subst__'): (123)
L302 if _is_unpacked_typevartuple(t): (123)
L1123 return ((not isinstance(x, type)) and (246)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (123)
L304 for x in getattr(t, '__parameters__', ()): (123)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L195 _InexactCodes = Literal[_FloatingCodes, _ComplexFloatingCodes] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (154)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (3)
L399 if isinstance(p, _LiteralGenericAlias): (2)
L400 params.extend(p.__args__) (2)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (76)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (151)
L1428 a for a in args) (150)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (75)
L277 if isinstance(t, type): (74)
L280 elif isinstance(t, tuple): (74)
L287 elif hasattr(t, '__typing_subst__'): (74)
L302 if _is_unpacked_typevartuple(t): (74)
L1123 return ((not isinstance(x, type)) and (148)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (74)
L304 for x in getattr(t, '__parameters__', ()): (74)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L196 _NumberCodes = Literal[_IntegerCodes, _InexactCodes] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (400)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (3)
L399 if isinstance(p, _LiteralGenericAlias): (2)
L400 params.extend(p.__args__) (2)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (199)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (397)
L1428 a for a in args) (396)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (198)
L277 if isinstance(t, type): (197)
L280 elif isinstance(t, tuple): (197)
L287 elif hasattr(t, '__typing_subst__'): (197)
L302 if _is_unpacked_typevartuple(t): (197)
L1123 return ((not isinstance(x, type)) and (394)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (197)
L304 for x in getattr(t, '__parameters__', ()): (197)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L198 _CharacterCodes = Literal[_StrCodes, _BytesCodes] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (36)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (3)
L399 if isinstance(p, _LiteralGenericAlias): (2)
L400 params.extend(p.__args__) (2)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (17)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (33)
L1428 a for a in args) (32)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (16)
L277 if isinstance(t, type): (15)
L280 elif isinstance(t, tuple): (15)
L287 elif hasattr(t, '__typing_subst__'): (15)
L302 if _is_unpacked_typevartuple(t): (15)
L1123 return ((not isinstance(x, type)) and (30)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (15)
L304 for x in getattr(t, '__parameters__', ()): (15)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L199 _FlexibleCodes = Literal[_VoidCodes, _CharacterCodes] (1)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (48)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (3)
L399 if isinstance(p, _LiteralGenericAlias): (2)
L400 params.extend(p.__args__) (2)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (23)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (45)
L1428 a for a in args) (44)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (22)
L277 if isinstance(t, type): (21)
L280 elif isinstance(t, tuple): (21)
L287 elif hasattr(t, '__typing_subst__'): (21)
L302 if _is_unpacked_typevartuple(t): (21)
L1123 return ((not isinstance(x, type)) and (42)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (21)
L304 for x in getattr(t, '__parameters__', ()): (21)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L201 _GenericCodes = Literal[ (2)
typing.py (1)
L581 if not isinstance(parameters, tuple): (1)
L583 return self._getitem(self, *parameters) (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (6)
L1803 return ((p, type(p)) for p in parameters) (1058)
L837 parameters = _flatten_literal_params(parameters) (1)
L397 params = [] (1)
L398 for p in parameters: (7)
L399 if isinstance(p, _LiteralGenericAlias): (6)
L400 params.extend(p.__args__) (6)
L403 return tuple(params) (1)
L839 try: (1)
L840 parameters = tuple(p for p, _ in _deduplicate(list(_value_and_type_iter(parameters)))) (524)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L844 return _LiteralGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (1047)
L1428 a for a in args) (1046)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (523)
L277 if isinstance(t, type): (522)
L280 elif isinstance(t, tuple): (522)
L287 elif hasattr(t, '__typing_subst__'): (522)
L302 if _is_unpacked_typevartuple(t): (522)
L1123 return ((not isinstance(x, type)) and (1044)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (522)
L304 for x in getattr(t, '__parameters__', ()): (522)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L202 _BoolCodes, (2)
L203 _NumberCodes, (1)
L204 _FlexibleCodes, (1)
L205 _DT64Codes, (1)
L206 _TD64Codes, (1)
L207 _ObjectCodes, (1)
_scalars.py (1)
L1 from typing import Any, TypeAlias (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L3 import numpy as np (1)
_shape.py (1)
L1 from collections.abc import Sequence (1)
L2 from typing import SupportsIndex, TypeAlias (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L4 _Shape: TypeAlias = tuple[int, ...] (1)
L7 _ShapeLike: TypeAlias = SupportsIndex | Sequence[SupportsIndex] (1)
_dtype_like.py (1)
L1 from collections.abc import Sequence # noqa: F811 (1)
L2 from typing import ( (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L11 import numpy as np (1)
_array_like.py (1)
L1 from __future__ import annotations (1)
L3 import sys (1)
L4 from collections.abc import Collection, Callable, Sequence (1)
L5 from typing import Any, Protocol, TypeAlias, TypeVar, runtime_checkable, TYPE_CHECKING (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L7 import numpy as np (1)
_ufunc.py (1)
L1 from .. import ufunc (1)
_function_base_impl.py (1)
L1 import builtins (1)
L2 import collections.abc (1)
L3 import functools (1)
L4 import re (1)
L5 import sys (1)
L6 import warnings (1)
L8 import numpy as np (1)
_histograms_impl.py (1)
L1 """ (1)
L4 import contextlib (1)
L5 import functools (1)
L6 import operator (1)
L7 import warnings (1)
L9 import numpy as np (1)
_nanfunctions_impl.py (1)
L1 """ (1)
L23 import functools (1)
L24 import warnings (1)
L25 import numpy as np (1)
_shape_base_impl.py (1)
L1 import functools (1)
L2 import warnings (1)
L4 import numpy._core.numeric as _nx (1)
_arraysetops_impl.py (1)
L1 """ (1)
L17 import functools (1)
L18 import warnings (1)
L19 from typing import NamedTuple (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L21 import numpy as np (1)
_polynomial_impl.py (1)
L1 """ (1)
L5 __all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd', (1)
L9 import functools (1)
L10 import re (1)
L11 import warnings (1)
L13 from .._utils import set_module (1)
_arrayterator_impl.py (1)
L1 """ (1)
L10 from operator import mul (1)
L11 from functools import reduce (1)
L13 __all__ = ['Arrayterator'] (1)
L16 class Arrayterator: (2)
L17 """ (1)
L86 __module__ = "numpy.lib" (1)
L88 def __init__(self, var, buf_size=None): (1)
L96 def __getattr__(self, attr): (1)
L99 def __getitem__(self, index): (1)
L131 def __array__(self, dtype=None, copy=None): (1)
L140 @property (2)
L141 def flat(self): (2)
L169 @property (2)
L170 def shape(self): (2)
L180 def __iter__(self): (1)
_arraypad_impl.py (1)
L1 """ (1)
L6 import numpy as np (1)
_version.py (1)
L1 """Utility to compare (NumPy) version strings. (1)
L8 import re (1)
L11 __all__ = ['NumpyVersion'] (1)
L14 class NumpyVersion: (2)
L15 """Parse and compare numpy version strings. (1)
L53 __module__ = "numpy.lib" (1)
L55 def __init__(self, vstring): (1)
L78 def _compare_version(self, other): (1)
L99 def _compare_pre_release(self, other): (1)
L114 def _compare(self, other): (1)
L136 def __lt__(self, other): (1)
L139 def __le__(self, other): (1)
L142 def __eq__(self, other): (1)
L145 def __ne__(self, other): (1)
L148 def __gt__(self, other): (1)
L151 def __ge__(self, other): (1)
L154 def __repr__(self): (1)
_array_api_info.py (1)
L1 """ (1)
L10 from numpy._core import ( (1)
L1131 (97)
L1132 (97)
L493 (720)
<frozen importlib._bootstrap_external> (616)
L1665 (428)
L1659 (371)
L1660 (337)
L1661 (337)
L103 (345)
L105 (345)
L107 (345)
L108 (345)
L109 (1035)
L110 (690)
L111 (345)
L112 (345)
L113 (345)
L122 (345)
L123 (345)
L124 (1035)
L125 (345)
L128 (345)
L1664 (337)
L1669 (34)
L1674 (34)
L1535 (34)
L1536 (34)
L1529 (45)
L1530 (44)
L1532 (44)
L1509 (44)
L1516 (44)
L1517 (44)
L1521 (44)
L1533 (44)
L1534 (33)
L1630 (33)
L1631 (33)
L1632 (33)
L1633 (33)
L152 (127)
L1636 (33)
L1640 (33)
L69 (33)
L1644 (33)
L1645 (33)
L1647 (33)
L1648 (2)
L1649 (6)
L1650 (6)
L1651 (6)
L1652 (6)
L166 (94)
L157 (94)
L158 (94)
L159 (4)
L160 (4)
L161 (90)
L1653 (2)
L1621 (90)
L1188 (86)
L1189 (86)
L1622 (180)
L1623 (90)
L846 (90)
L858 (90)
L859 (90)
L860 (90)
L192 (90)
L179 (90)
L181 (90)
L182 (90)
L197 (90)
L870 (90)
L1156 (184)
L1157 (92)
L1158 (92)
L785 (92)
L786 (92)
L787 (92)
L788 (92)
L789 (92)
L790 (92)
L1024 (92)
L1027 (92)
L1666 (88)
L1667 (176)
L1668 (88)
L1548 (1)
L1309 (4)
L1310 (4)
L1325 (4)
L601 (101)
L602 (101)
L603 (101)
L604 (101)
L605 (101)
L606 (101)
L609 (101)
L610 (101)
<frozen importlib._bootstrap_external> (97)
L871 (96)
L874 (96)
L884 (96)
L895 (96)
L896 (96)
L901 (96)
L1535 (96)
L1537 (96)
L1538 (96)
L1561 (97)
L1563 (97)
L1574 (96)
L1549 (1)
L1550 (1)
L1564 (1)
L1565 (1)
L1572 (1)
L1265 (100)
L1280 (100)
L1323 (101)
L1326 (100)
L1330 (100)
L1331 (100)
L913 (100)
L915 (100)
L921 (100)
L809 (100)
L810 (100)
L813 (100)
<frozen importlib._bootstrap_external> (96)
L1018 (92)
L1321 (8)
L1322 (4)
L817 (100)
L818 (92)
L49 (92)
L819 (100)
L737 (100)
L743 (100)
L744 (100)
L745 (100)
L766 (100)
L767 (100)
L771 (100)
L772 (100)
L773 (100)
L648 (296)
L651 (99)
__init__.py (27)
L115 try: (1)
L116 __NUMPY_SETUP__ (1)
L117 except NameError: (1)
L118 __NUMPY_SETUP__ = False (1)
L120 if __NUMPY_SETUP__: (1)
L124 from . import _distributor_init (1)
L73 multiarray.set_typeDict(nt.sctypeDict) (1)
L74 from . import numeric (1)
L76 from . import fromnumeric (1)
L78 from .records import record, recarray (1)
L83 from . import _machar (1)
L86 from . import shape_base (1)
L88 from . import einsumfunc (1)
L90 del nt (1)
L92 from .numeric import absolute as abs (1)
L96 from . import _add_newdocs (1)
L91 __all__ = _linalg.__all__.copy() (1)
L93 from numpy._pytesttester import PytestTester (1)
L94 test = PytestTester(__name__) (1)
_pytesttester.py (1)
L76 self.module_name = module_name (1)
L77 self.__module__ = module_name (1)
L95 del PytestTester (1)
L7 __all__ = defmatrix.__all__ (1)
L9 from numpy._pytesttester import PytestTester (1)
L10 test = PytestTester(__name__) (1)
_pytesttester.py (1)
L76 self.module_name = module_name (1)
L77 self.__module__ = module_name (1)
L11 del PytestTester (1)
L41 from ._version import NumpyVersion (1)
L42 from numpy._core._multiarray_umath import add_docstring, tracemalloc_domain (1)
L43 from numpy._core.function_base import add_newdoc (1)
L45 __all__ = [ (1)
L51 add_newdoc.__module__ = "numpy.lib" (1)
L53 from numpy._pytesttester import PytestTester (1)
L54 test = PytestTester(__name__) (1)
_pytesttester.py (1)
L76 self.module_name = module_name (1)
L77 self.__module__ = module_name (1)
L55 del PytestTester (1)
L57 def __getattr__(attr): (1)
L199 from .lib._nanfunctions_impl import ( (1)
L204 from .lib._function_base_impl import ( (1)
L212 from .lib._twodim_base_impl import ( (1)
L217 from .lib._shape_base_impl import ( (1)
L222 from .lib._type_check_impl import ( (1)
L226 from .lib._arraysetops_impl import ( (1)
L230 from .lib._ufunclike_impl import fix, isneginf, isposinf (1)
L231 from .lib._arraypad_impl import pad (1)
L232 from .lib._utils_impl import ( (1)
L235 from .lib._stride_tricks_impl import ( (1)
L238 from .lib._polynomial_impl import ( (1)
L242 from .lib._npyio_impl import ( (1)
L246 from .lib._index_tricks_impl import ( (1)
L252 from . import matrixlib as _mat (1)
L777 (100)
L778 (100)
L782 (100)
L783 (100)
L785 (8)
L786 (8)
L790 (100)
L655 (106)
_distributor_init.py (1)
L14 except ImportError: (1)
L15 pass (1)
_add_newdocs_scalars.py (5)
L23 except AttributeError: (4)
L25 pass (4)
L20 for alias, doc in aliases: (6)
L21 try: (5)
L22 alias_type = getattr(_numerictypes, alias) (5)
L27 yield (alias_type, alias, doc) (2)
L54 def _get_platform_and_machine(): (1)
L67 _system, _machine = _get_platform_and_machine() (1)
L55 try: (1)
L56 system, _, _, _, machine = os.uname() (1)
L57 except AttributeError: (1)
L58 system = sys.platform (1)
L59 if system == 'win32': (1)
L60 machine = os.environ.get('PROCESSOR_ARCHITEW6432', '') \ (2)
<frozen _collections_abc> (1)
L810 (1)
L811 (1)
<frozen os> (1)
L713 (1)
L714 (1)
L787 (1)
L781 (1)
L783 (1)
L715 (1)
L717 (1)
L812 (1)
L813 (1)
L61 or os.environ.get('PROCESSOR_ARCHITECTURE', '') (1)
<frozen _collections_abc> (1)
L810 (1)
L811 (1)
<frozen os> (1)
L713 (1)
L714 (1)
L787 (1)
L781 (1)
L783 (1)
L718 (1)
L64 return system, machine (1)
L68 _doc_alias_string = f":Alias on this platform ({_system} {_machine}):" (1)
L71 def add_newdoc_for_scalar_type(obj, fixed_aliases, doc): (1)
L97 """ (1)
L96 _bool_docstring = ( (1)
L109 add_newdoc_for_scalar_type('bool', [], _bool_docstring) (1)
L73 o = getattr(_numerictypes, obj) (25)
L75 character_code = dtype(o).char (25)
L76 canonical_name_doc = "" if obj == o.__name__ else \ (39)
L78 if fixed_aliases: (25)
L82 alias_doc = '' (25)
L83 alias_doc += ''.join(f"{_doc_alias_string} `numpy.{alias}`: {doc}.\n " (450)
L84 for (alias_type, alias, doc) in possible_aliases if alias_type is o) (425)
L86 docstring = f""" (50)
L87 {doc.strip()} (25)
L89 :Character code: ``'{character_code}'`` (25)
L90 {canonical_name_doc}{alias_doc} (25)
L93 add_newdoc('numpy._core.numerictypes', obj, docstring) (25)
function_base.py (25)
L534 new = getattr(__import__(place, globals(), {}, [obj]), obj) (25)
L535 if isinstance(doc, str): (25)
L536 if "${ARRAY_FUNCTION_LIKE}" in doc: (25)
L538 _add_docstring(new, doc.strip(), warn_on_python) (25)
L474 if warn_on_python and not _needs_add_docstring(obj): (25)
L462 Py_TPFLAGS_HEAPTYPE = 1 << 9 (25)
L464 if isinstance(obj, (types.FunctionType, types.MethodType, property)): (25)
L467 if isinstance(obj, type) and obj.__flags__ & Py_TPFLAGS_HEAPTYPE: (25)
L470 return True (25)
L481 try: (25)
L482 add_docstring(obj, doc) (25)
L483 except Exception: (3)
L484 pass (3)
L111 add_newdoc_for_scalar_type('bool_', [], _bool_docstring) (1)
L77 f":Canonical name: `numpy.{obj}`\n " (14)
L113 add_newdoc_for_scalar_type('byte', [], (2)
L114 """ (1)
L118 add_newdoc_for_scalar_type('short', [], (2)
L119 """ (1)
L123 add_newdoc_for_scalar_type('intc', [], (2)
L124 """ (1)
L130 add_newdoc_for_scalar_type('int_', [], (2)
L131 """ (1)
L136 add_newdoc_for_scalar_type('longlong', [], (2)
L137 """ (1)
L141 add_newdoc_for_scalar_type('ubyte', [], (2)
L142 """ (1)
L146 add_newdoc_for_scalar_type('ushort', [], (2)
L147 """ (1)
L151 add_newdoc_for_scalar_type('uintc', [], (2)
L152 """ (1)
L156 add_newdoc_for_scalar_type('uint', [], (2)
L157 """ (1)
L162 add_newdoc_for_scalar_type('ulonglong', [], (2)
L163 """ (1)
L167 add_newdoc_for_scalar_type('half', [], (2)
L168 """ (1)
L172 add_newdoc_for_scalar_type('single', [], (2)
L173 """ (1)
L177 add_newdoc_for_scalar_type('double', [], (2)
L178 """ (1)
L183 add_newdoc_for_scalar_type('longdouble', [], (2)
L184 """ (1)
L189 add_newdoc_for_scalar_type('csingle', [], (2)
L190 """ (1)
L195 add_newdoc_for_scalar_type('cdouble', [], (2)
L196 """ (1)
L201 add_newdoc_for_scalar_type('clongdouble', [], (2)
L202 """ (1)
L207 add_newdoc_for_scalar_type('object_', [], (2)
L208 """ (1)
L212 add_newdoc_for_scalar_type('str_', [], (2)
L213 r""" (1)
L232 add_newdoc_for_scalar_type('bytes_', [], (2)
L233 r""" (1)
L239 add_newdoc_for_scalar_type('void', [], (2)
L240 r""" (1)
L289 add_newdoc_for_scalar_type('datetime64', [], (2)
L290 """ (1)
L313 add_newdoc_for_scalar_type('timedelta64', [], (2)
L314 """ (1)
L320 add_newdoc('numpy._core.numerictypes', "integer", ('is_integer', (1)
function_base.py (1)
L534 new = getattr(__import__(place, globals(), {}, [obj]), obj) (1)
L535 if isinstance(doc, str): (1)
L539 elif isinstance(doc, tuple): (1)
L540 attr, docstring = doc (1)
L541 _add_docstring(getattr(new, attr), docstring.strip(), warn_on_python) (1)
L474 if warn_on_python and not _needs_add_docstring(obj): (1)
L462 Py_TPFLAGS_HEAPTYPE = 1 << 9 (1)
L464 if isinstance(obj, (types.FunctionType, types.MethodType, property)): (1)
L467 if isinstance(obj, type) and obj.__flags__ & Py_TPFLAGS_HEAPTYPE: (1)
L470 return True (1)
L481 try: (1)
L482 add_docstring(obj, doc) (1)
L338 for float_name in ('half', 'single', 'double', 'longdouble'): (5)
L339 add_newdoc('numpy._core.numerictypes', float_name, ('as_integer_ratio', (8)
function_base.py (4)
L534 new = getattr(__import__(place, globals(), {}, [obj]), obj) (4)
L535 if isinstance(doc, str): (4)
L539 elif isinstance(doc, tuple): (4)
L540 attr, docstring = doc (4)
L541 _add_docstring(getattr(new, attr), docstring.strip(), warn_on_python) (4)
L474 if warn_on_python and not _needs_add_docstring(obj): (4)
L462 Py_TPFLAGS_HEAPTYPE = 1 << 9 (4)
L464 if isinstance(obj, (types.FunctionType, types.MethodType, property)): (4)
L467 if isinstance(obj, type) and obj.__flags__ & Py_TPFLAGS_HEAPTYPE: (4)
L470 return True (4)
L481 try: (4)
L482 add_docstring(obj, doc) (4)
L340 """ (4)
L353 """.format(ftype=float_name))) (4)
L355 add_newdoc('numpy._core.numerictypes', float_name, ('is_integer', (8)
function_base.py (4)
L534 new = getattr(__import__(place, globals(), {}, [obj]), obj) (4)
L535 if isinstance(doc, str): (4)
L539 elif isinstance(doc, tuple): (4)
L540 attr, docstring = doc (4)
L541 _add_docstring(getattr(new, attr), docstring.strip(), warn_on_python) (4)
L474 if warn_on_python and not _needs_add_docstring(obj): (4)
L462 Py_TPFLAGS_HEAPTYPE = 1 << 9 (4)
L464 if isinstance(obj, (types.FunctionType, types.MethodType, property)): (4)
L467 if isinstance(obj, type) and obj.__flags__ & Py_TPFLAGS_HEAPTYPE: (4)
L470 return True (4)
L481 try: (4)
L482 add_docstring(obj, doc) (4)
L356 f""" (8)
L357 {float_name}.is_integer() -> bool (4)
L366 >>> np.{float_name}(-2.0).is_integer() (4)
L368 >>> np.{float_name}(3.2).is_integer() (4)
L372 for int_name in ('int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', (13)
L375 add_newdoc('numpy._core.numerictypes', int_name, ('bit_count', (24)
function_base.py (12)
L534 new = getattr(__import__(place, globals(), {}, [obj]), obj) (12)
L535 if isinstance(doc, str): (12)
L539 elif isinstance(doc, tuple): (12)
L540 attr, docstring = doc (12)
L541 _add_docstring(getattr(new, attr), docstring.strip(), warn_on_python) (12)
L474 if warn_on_python and not _needs_add_docstring(obj): (12)
L462 Py_TPFLAGS_HEAPTYPE = 1 << 9 (12)
L464 if isinstance(obj, (types.FunctionType, types.MethodType, property)): (12)
L467 if isinstance(obj, type) and obj.__flags__ & Py_TPFLAGS_HEAPTYPE: (12)
L470 return True (12)
L481 try: (12)
L482 add_docstring(obj, doc) (12)
L376 f""" (36)
L377 {int_name}.bit_count() -> int (12)
L384 >>> np.{int_name}(127).bit_count() (12)
L389 """ if dtype(int_name).char.islower() else ""))) (12)
L386 (f""" (12)
L387 >>> np.{int_name}(-127).bit_count() (6)
L791 (96)
L792 (94)
L793 (94)
L797 (96)
L798 (96)
L634 (188)
L635 (96)
L636 (96)
L638 (96)
<frozen importlib._bootstrap_external> (96)
L644 (96)
L645 (92)
L646 (92)
L531 (92)
L538 (92)
L539 (92)
L139 (368)
L140 (92)
L142 (92)
L540 (92)
L541 (92)
L542 (92)
L544 (92)
L545 (92)
L546 (92)
L547 (92)
L550 (92)
L551 (92)
L555 (92)
L556 (92)
L581 (92)
L103 (92)
L105 (92)
L107 (92)
L108 (92)
L109 (368)
L110 (276)
L111 (92)
L112 (92)
L113 (184)
L122 (184)
L123 (184)
L124 (368)
L125 (92)
L128 (92)
L649 (4)
L652 (4)
L639 (188)
L799 (92)
L800 (92)
L803 (100)
L820 (100)
L926 (100)
L927 (100)
L928 (100)
L929 (100)
L930 (100)
L935 (100)
<frozen importlib._bootstrap_external> (96)
L1023 (92)
L1101 (92)
L676 (92)
L678 (92)
L681 (92)
L1213 (92)
L1102 (92)
L1103 (92)
L1104 (92)
L1105 (92)
L1106 (92)
L1107 (92)
L1108 (92)
L531 (92)
L538 (92)
L539 (92)
L139 (368)
L140 (92)
L142 (92)
L540 (92)
L541 (92)
L542 (92)
L544 (92)
L545 (92)
L546 (92)
L547 (92)
L550 (92)
L551 (92)
L555 (92)
L556 (92)
L581 (92)
L103 (92)
L105 (92)
L107 (92)
L108 (92)
L109 (368)
L110 (276)
L111 (92)
L112 (92)
L113 (184)
L122 (184)
L123 (184)
L124 (368)
L125 (92)
L128 (92)
L1112 (92)
L1113 (92)
L1236 (92)
L152 (92)
L1237 (92)
L1117 (92)
L1118 (92)
L1119 (92)
L1217 (92)
L1218 (184)
L1219 (92)
L1124 (92)
L1125 (92)
L1123 (92)
L1127 (92)
L1128 (92)
L714 (92)
L715 (92)
L719 (92)
L723 (92)
L91 (276)
L92 (276)
L725 (92)
L728 (92)
L1129 (92)
L1130 (92)
L1131 (92)
L1144 (184)
L1145 (92)
L1146 (92)
L1147 (92)
L1148 (92)
L1149 (92)
L750 (92)
L754 (92)
L755 (92)
L1154 (184)
L1155 (92)
L1329 (4)
L1309 (87)
L1312 (87)
L1314 (86)
L1315 (86)
L1316 (86)
L1320 (86)
L1321 (86)
L1329 (85)
L649 (197)
multiarray.py (2)
L16 from ._multiarray_umath import ( (1)
L22 __all__ = [ (1)
L46 _reconstruct.__module__ = 'numpy._core.multiarray' (1)
L47 scalar.__module__ = 'numpy._core.multiarray' (1)
L50 from_dlpack.__module__ = 'numpy' (1)
L51 arange.__module__ = 'numpy' (1)
L52 array.__module__ = 'numpy' (1)
L53 asarray.__module__ = 'numpy' (1)
L54 asanyarray.__module__ = 'numpy' (1)
L55 ascontiguousarray.__module__ = 'numpy' (1)
L56 asfortranarray.__module__ = 'numpy' (1)
L57 datetime_data.__module__ = 'numpy' (1)
L58 empty.__module__ = 'numpy' (1)
L59 frombuffer.__module__ = 'numpy' (1)
L60 fromfile.__module__ = 'numpy' (1)
L61 fromiter.__module__ = 'numpy' (1)
L62 frompyfunc.__module__ = 'numpy' (1)
L63 fromstring.__module__ = 'numpy' (1)
L64 may_share_memory.__module__ = 'numpy' (1)
L65 nested_iters.__module__ = 'numpy' (1)
L66 promote_types.__module__ = 'numpy' (1)
L67 zeros.__module__ = 'numpy' (1)
L68 normalize_axis_index.__module__ = 'numpy.lib.array_utils' (1)
L69 add_docstring.__module__ = 'numpy.lib' (1)
L70 compare_chararrays.__module__ = 'numpy.char' (1)
L73 def _override___module__(): (1)
L97 _override___module__() (1)
L74 namespace_names = globals() (1)
L75 for ufunc_name in [ (91)
L92 ufunc = namespace_names[ufunc_name] (90)
L93 ufunc.__module__ = "numpy" (90)
L94 ufunc.__qualname__ = ufunc_name (90)
L102 array_function_from_c_func_and_dispatcher = functools.partial( (2)
L103 overrides.array_function_from_dispatcher, (1)
L104 module='numpy', docs_from_dispatcher=True, verify=False) (1)
L107 @array_function_from_c_func_and_dispatcher(_multiarray_umath.empty_like) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L109 prototype, dtype=None, order=None, subok=None, shape=None, *, device=None (2)
L108 def empty_like( (3)
L180 @array_function_from_c_func_and_dispatcher(_multiarray_umath.concatenate) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L181 def concatenate(arrays, axis=None, out=None, *, dtype=None, casting=None): (2)
L289 @array_function_from_c_func_and_dispatcher(_multiarray_umath.inner) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L290 def inner(a, b): (2)
L383 @array_function_from_c_func_and_dispatcher(_multiarray_umath.where) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L384 def where(condition, x=None, y=None): (2)
L459 @array_function_from_c_func_and_dispatcher(_multiarray_umath.lexsort) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L460 def lexsort(keys, axis=None): (2)
L580 @array_function_from_c_func_and_dispatcher(_multiarray_umath.can_cast) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L581 def can_cast(from_, to, casting=None): (2)
L642 @array_function_from_c_func_and_dispatcher(_multiarray_umath.min_scalar_type) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L643 def min_scalar_type(a): (2)
L690 @array_function_from_c_func_and_dispatcher(_multiarray_umath.result_type) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L691 def result_type(*arrays_and_dtypes): (2)
L761 @array_function_from_c_func_and_dispatcher(_multiarray_umath.dot) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L762 def dot(a, b, out=None): (2)
L856 @array_function_from_c_func_and_dispatcher(_multiarray_umath.vdot) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L857 def vdot(a, b): (2)
L919 @array_function_from_c_func_and_dispatcher(_multiarray_umath.bincount) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L920 def bincount(x, weights=None, minlength=None): (2)
L995 @array_function_from_c_func_and_dispatcher(_multiarray_umath.ravel_multi_index) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L996 def ravel_multi_index(multi_index, dims, mode=None, order=None): (2)
L1053 @array_function_from_c_func_and_dispatcher(_multiarray_umath.unravel_index) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1054 def unravel_index(indices, shape=None, order=None): (2)
L1098 @array_function_from_c_func_and_dispatcher(_multiarray_umath.copyto) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1099 def copyto(dst, src, casting=None, where=None): (2)
L1148 @array_function_from_c_func_and_dispatcher(_multiarray_umath.putmask) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1149 def putmask(a, /, mask, values): (2)
L1194 @array_function_from_c_func_and_dispatcher(_multiarray_umath.packbits) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1195 def packbits(a, axis=None, bitorder='big'): (2)
L1251 @array_function_from_c_func_and_dispatcher(_multiarray_umath.unpackbits) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1252 def unpackbits(a, axis=None, count=None, bitorder='big'): (2)
L1331 @array_function_from_c_func_and_dispatcher(_multiarray_umath.shares_memory) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1332 def shares_memory(a, b, max_work=None): (2)
L1410 @array_function_from_c_func_and_dispatcher(_multiarray_umath.may_share_memory) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1411 def may_share_memory(a, b, max_work=None): (2)
L1452 @array_function_from_c_func_and_dispatcher(_multiarray_umath.is_busday) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1453 def is_busday(dates, weekmask=None, holidays=None, busdaycal=None, out=None): (2)
L1511 @array_function_from_c_func_and_dispatcher(_multiarray_umath.busday_offset) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1512 def busday_offset(dates, offsets, roll=None, weekmask=None, holidays=None, (3)
L1513 busdaycal=None, out=None): (1)
L1613 @array_function_from_c_func_and_dispatcher(_multiarray_umath.busday_count) (2)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1614 def busday_count(begindates, enddates, weekmask=None, holidays=None, (3)
L1615 busdaycal=None, out=None): (1)
L1687 @array_function_from_c_func_and_dispatcher( (3)
overrides.py (2)
L177 def decorator(dispatcher): (1)
L181 return decorator (1)
L178 return array_function_dispatch( (3)
L179 dispatcher, module, verify=verify, (1)
L180 docs_from_dispatcher=docs_from_dispatcher)(implementation) (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L158 add_docstring(implementation, dispatcher.__doc__) (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (4)
L54 except AttributeError: (2)
L55 pass (2)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1688 _multiarray_umath.datetime_as_string) (1)
L1689 def datetime_as_string(arr, unit=None, timezone=None, casting=None): (2)
umath.py (3)
L15 from ._multiarray_umath import ( (1)
L19 from ._multiarray_umath import ( (1)
L25 __all__ = [ (1)
numerictypes.py (1)
L87 from .._utils import set_module (1)
numeric.py (10)
L23 from . import overrides (1)
L27 from .umath import (multiply, invert, sin, PINF, NAN) (1)
L28 from . import numerictypes (1)
L30 from ._ufunc_config import errstate (1)
L2699 from .numerictypes import * (1)
L2700 from . import fromnumeric (1)
L2702 from . import arrayprint (1)
L2704 from . import _asarray (1)
L2706 from . import _ufunc_config (1)
L2708 extend_all(fromnumeric) (1)
L2691 existing = set(__all__) (6)
L2692 mall = module.__all__ (6)
L2693 for a in mall: (224)
L2694 if a not in existing: (218)
L2695 __all__.append(a) (217)
L2709 extend_all(umath) (1)
L2710 extend_all(numerictypes) (1)
L2711 extend_all(arrayprint) (1)
L2712 extend_all(_asarray) (1)
L2713 extend_all(_ufunc_config) (1)
shape_base.py (1)
L11 from . import fromnumeric as _from_nx (1)
fromnumeric.py (2)
L15 from ._multiarray_umath import _array_converter (1)
L16 from . import _methods (1)
_ufunc_config.py (1)
L14 __all__ = [ (1)
L20 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L21 def seterr(all=None, divide=None, over=None, under=None, invalid=None): (2)
L109 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L110 def geterr(): (2)
L157 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L158 def setbufsize(size): (2)
L197 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L198 def getbufsize(): (2)
L217 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L218 def seterrcall(func): (2)
L307 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L308 def geterrcall(): (2)
L356 class _unspecified: (2)
L357 pass (1)
L360 _Unspecified = _unspecified() (1)
L363 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L364 class errstate: (2)
L365 """ (1)
L427 __slots__ = ( (1)
L430 def __init__(self, *, call=_Unspecified, (2)
L431 all=None, divide=None, over=None, under=None, invalid=None): (1)
L440 def __enter__(self): (1)
L456 def __exit__(self, *exc_info): (1)
L459 def __call__(self, func): (1)
arrayprint.py (6)
L36 from . import multiarray (1)
L39 from .fromnumeric import any (1)
L40 from .numeric import concatenate, asarray, errstate (1)
L43 from .overrides import array_function_dispatch, set_module (1)
L44 from .printoptions import format_options (1)
L45 import operator (1)
L46 import warnings (1)
L47 import contextlib (1)
L50 def _make_options_dict(precision=None, threshold=None, edgeitems=None, (2)
L51 linewidth=None, suppress=None, nanstr=None, infstr=None, (1)
L52 sign=None, formatter=None, floatmode=None, legacy=None, (1)
L53 override_repr=None): (1)
L113 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L114 def set_printoptions(precision=None, threshold=None, edgeitems=None, (4)
L115 linewidth=None, suppress=None, nanstr=None, (1)
L116 infstr=None, formatter=None, sign=None, floatmode=None, (1)
L117 *, legacy=None, override_repr=None): (1)
L298 def _set_printoptions(precision=None, threshold=None, edgeitems=None, (3)
L299 linewidth=None, suppress=None, nanstr=None, (1)
L300 infstr=None, formatter=None, sign=None, floatmode=None, (1)
L301 *, legacy=None, override_repr=None): (1)
L318 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L319 def get_printoptions(): (2)
L367 def _get_legacy_print_mode(): (1)
L372 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L373 @contextlib.contextmanager (2)
contextlib.py (1)
L303 @wraps(func) (2)
functools.py (2)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L304 def helper(*args, **kwds): (2)
L306 return helper (1)
L374 def printoptions(*args, **kwargs): (2)
L408 def _leading_trailing(a, edgeitems, index=()): (1)
L428 def _object_format(o): (1)
L436 def repr_format(x): (1)
L441 def str_format(x): (1)
L446 def _get_formatdict(data, *, precision, floatmode, suppress, sign, legacy, (1)
L496 def _get_format_function(data, **options): (1)
L537 def _recursive_guard(fillvalue='...'): (1)
L567 @_recursive_guard() (2)
L547 def decorating_function(f): (2)
L563 return decorating_function (2)
L568 def _array2string(a, options, separator=' ', prefix=""): (2)
L548 repr_running = set() (2)
L550 @functools.wraps(f) (4)
functools.py (4)
L77 return partial(update_wrapper, wrapped=wrapped, (4)
L78 assigned=assigned, updated=updated) (2)
L51 for attr in assigned: (14)
L52 try: (12)
L53 value = getattr(wrapped, attr) (12)
L57 setattr(wrapper, attr, value) (12)
L58 for attr in updated: (4)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (2)
L62 wrapper.__wrapped__ = wrapped (2)
L64 return wrapper (2)
L551 def wrapper(self, *args, **kwargs): (4)
L561 return wrapper (2)
L597 a, max_line_width=None, precision=None, (1)
L598 suppress_small=None, separator=None, prefix=None, (1)
L599 style=None, formatter=None, threshold=None, (1)
L600 edgeitems=None, sign=None, floatmode=None, suffix=None, (1)
L596 def _array2string_dispatcher( (2)
L601 *, legacy=None): (1)
L605 @array_function_dispatch(_array2string_dispatcher, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (14)
L85 if args[i][:1] in ['', '.']: (13)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (14)
L85 if args[i][:1] in ['', '.']: (13)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L606 def array2string(a, max_line_width=None, precision=None, (4)
L607 suppress_small=None, separator=' ', prefix="", (1)
L608 style=np._NoValue, formatter=None, threshold=None, (1)
L609 edgeitems=None, sign=None, floatmode=None, suffix="", (1)
L610 *, legacy=None): (1)
L787 def _extendLine(s, line, word, line_width, next_line_prefix, legacy): (1)
L801 def _extendLine_pretty(s, line, word, line_width, next_line_prefix, legacy): (1)
L828 def _formatArray(a, format_function, line_width, next_line_prefix, (1)
L952 def _none_or_positive_arg(x, name): (1)
L959 class FloatingFormat: (2)
L960 """ Formatter for subtypes of np.floating """ (1)
L961 def __init__(self, data, precision, floatmode, suppress_small, sign=False, (2)
L962 *, legacy=None): (1)
L987 def fillFormat(self, data): (1)
L1073 def __call__(self, x): (1)
L1108 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1109 def format_float_scientific(x, precision=None, unique=True, trim='k', (3)
L1110 sign=False, pad_left=None, exp_digits=None, (1)
L1111 min_digits=None): (1)
L1189 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1190 def format_float_positional(x, precision=None, unique=True, (3)
L1191 fractional=True, trim='k', sign=False, (1)
L1192 pad_left=None, pad_right=None, min_digits=None): (1)
L1281 class IntegerFormat: (2)
L1282 def __init__(self, data, sign='-'): (1)
L1297 def __call__(self, x): (1)
L1300 class BoolFormat: (2)
L1301 def __init__(self, data, **kwargs): (1)
L1306 def __call__(self, x): (1)
L1310 class ComplexFloatingFormat: (2)
L1311 """ Formatter for subtypes of np.complexfloating """ (1)
L1313 sign=False, *, legacy=None): (2)
L1312 def __init__(self, x, precision, floatmode, suppress_small, (2)
L1332 def __call__(self, x): (1)
L1343 class _TimelikeFormat: (2)
L1344 def __init__(self, data): (1)
L1358 def _format_non_nat(self, x): (1)
L1362 def __call__(self, x): (1)
L1369 class DatetimeFormat(_TimelikeFormat): (2)
L1370 def __init__(self, x, unit=None, timezone=None, casting='same_kind', (2)
L1371 legacy=False): (1)
L1389 def __call__(self, x): (1)
L1394 def _format_non_nat(self, x): (1)
L1401 class TimedeltaFormat(_TimelikeFormat): (2)
L1402 def _format_non_nat(self, x): (1)
L1406 class SubArrayFormat: (2)
L1407 def __init__(self, format_function, **options): (1)
L1412 def __call__(self, a): (1)
L1416 def format_array(self, a): (1)
L1432 class StructuredVoidFormat: (2)
L1433 """ (1)
L1440 def __init__(self, format_functions): (1)
L1443 @classmethod (2)
L1444 def from_data(cls, data, **options): (2)
L1458 def __call__(self, x): (1)
L1469 def _void_scalar_to_string(x, is_repr=True): (1)
L1492 _typelessdata = [int_, float64, complex128, _nt.bool] (1)
L1495 def dtype_is_implied(dtype): (1)
L1537 def dtype_short_repr(dtype): (1)
L1570 arr, max_line_width=None, precision=None, suppress_small=None, (1)
L1571 array2string=array2string): (1)
L1569 def _array_repr_implementation( (1)
L1624 arr, max_line_width=None, precision=None, suppress_small=None): (1)
L1623 def _array_repr_dispatcher( (1)
L1628 @array_function_dispatch(_array_repr_dispatcher, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1629 def array_repr(arr, max_line_width=None, precision=None, suppress_small=None): (2)
L1678 @_recursive_guard() (2)
L1679 def _guarded_repr_or_str(v): (2)
L1686 a, max_line_width=None, precision=None, suppress_small=None, (1)
L1687 array2string=array2string): (1)
L1685 def _array_str_implementation( (1)
L1706 a, max_line_width=None, precision=None, suppress_small=None): (1)
L1705 def _array_str_dispatcher( (1)
L1710 @array_function_dispatch(_array_str_dispatcher, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1711 def array_str(a, max_line_width=None, precision=None, suppress_small=None): (2)
L1752 _array2string_impl = getattr(array2string, '__wrapped__', array2string) (1)
L1753 _default_array_str = functools.partial(_array_str_implementation, (2)
L1754 array2string=_array2string_impl) (1)
L1755 _default_array_repr = functools.partial(_array_repr_implementation, (2)
L1756 array2string=_array2string_impl) (1)
_asarray.py (2)
L11 from .multiarray import array, asanyarray (1)
L14 __all__ = ["require"] (1)
L18 'C': 'C', 'C_CONTIGUOUS': 'C', 'CONTIGUOUS': 'C', (1)
L19 'F': 'F', 'F_CONTIGUOUS': 'F', 'FORTRAN': 'F', (1)
L20 'A': 'A', 'ALIGNED': 'A', (1)
L21 'W': 'W', 'WRITEABLE': 'W', (1)
L22 'O': 'O', 'OWNDATA': 'O', (1)
L23 'E': 'E', 'ENSUREARRAY': 'E' (1)
L17 POSSIBLE_FLAGS = { (1)
L27 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L28 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L29 def require(a, dtype=None, requirements=None, *, like=None): (2)
L135 _require_with_like = array_function_dispatch()(require) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
records.py (1)
L15 __all__ = [ (1)
L21 ndarray = sb.ndarray (1)
L23 _byteorderconv = {'b': '>', (2)
L24 'l': '<', (1)
L25 'n': '=', (1)
L26 'B': '>', (1)
L27 'L': '<', (1)
L28 'N': '=', (1)
L29 'S': 's', (1)
L30 's': 's', (1)
L31 '>': '>', (1)
L32 '<': '<', (1)
L33 '=': '=', (1)
L34 '|': '|', (1)
L35 'I': '|', (1)
L36 'i': '|'} (1)
L43 numfmt = nt.sctypeDict (1)
L46 @set_module('numpy.rec') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L47 def find_duplicate(list): (2)
L56 @set_module('numpy.rec') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L57 class format_parser: (2)
L58 """ (1)
L117 def __init__(self, formats, names, titles, aligned=False, byteorder=None): (1)
L122 def _parseFormats(self, formats, aligned=False): (1)
L146 def _setfieldnames(self, names, titles): (1)
L182 def _createdtype(self, byteorder): (1)
L196 class record(nt.void): (2)
L197 """A data-type scalar that allows field access as attribute lookup. (1)
L202 __name__ = 'record' (1)
L203 __module__ = 'numpy' (1)
L205 def __repr__(self): (1)
L210 def __str__(self): (1)
L215 def __getattribute__(self, attr): (1)
L240 def __setattr__(self, attr, val): (1)
L254 def __getitem__(self, indx): (1)
L264 def pprint(self): (1)
L282 @set_module("numpy.rec") (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L283 class recarray(ndarray): (2)
L284 """Construct an ndarray that allows field access using attributes. (1)
L389 def __new__(subtype, shape, dtype=None, buf=None, offset=0, strides=None, (2)
L390 formats=None, names=None, titles=None, (1)
L391 byteorder=None, aligned=False, order='C'): (1)
L411 def __array_finalize__(self, obj): (1)
L417 def __getattribute__(self, attr): (1)
L451 def __setattr__(self, attr, val): (1)
L488 def __getitem__(self, indx): (1)
L505 def __repr__(self): (1)
L541 def field(self, attr, val=None): (1)
L559 def _deprecate_shape_0_as_None(shape): (1)
L571 @set_module("numpy.rec") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L572 def fromarrays(arrayList, dtype=None, shape=None, formats=None, (3)
L573 names=None, titles=None, aligned=False, byteorder=None): (1)
L666 @set_module("numpy.rec") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L667 def fromrecords(recList, dtype=None, shape=None, formats=None, names=None, (3)
L668 titles=None, aligned=False, byteorder=None): (1)
L755 @set_module("numpy.rec") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L756 def fromstring(datastring, dtype=None, shape=None, offset=0, formats=None, (3)
L757 names=None, titles=None, aligned=False, byteorder=None): (1)
L830 def get_remaining_size(fd): (1)
L839 @set_module("numpy.rec") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L840 def fromfile(fd, dtype=None, shape=None, offset=0, formats=None, (3)
L841 names=None, titles=None, aligned=False, byteorder=None): (1)
L944 @set_module("numpy.rec") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L945 def array(obj, dtype=None, shape=None, offset=0, strides=None, formats=None, (3)
L946 names=None, titles=None, aligned=False, byteorder=None, copy=True): (1)
memmap.py (1)
L7 __all__ = ['memmap'] (1)
L9 dtypedescr = dtype (1)
L10 valid_filemodes = ["r", "c", "r+", "w+"] (1)
L11 writeable_filemodes = ["r+", "w+"] (1)
L14 "readonly":"r", (1)
L15 "copyonwrite":"c", (1)
L16 "readwrite":"r+", (1)
L17 "write":"w+" (1)
L13 mode_equivalents = { (1)
L21 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L22 class memmap(ndarray): (2)
L23 """Create a memory-map to an array stored in a *binary* file on disk. (1)
L212 __array_priority__ = -100.0 (1)
L214 def __new__(subtype, filename, dtype=uint8, mode='r+', offset=0, (2)
L215 shape=None, order='C'): (1)
L310 def __array_finalize__(self, obj): (1)
L322 def flush(self): (1)
L340 def __array_wrap__(self, arr, context=None, return_scalar=False): (1)
L357 def __getitem__(self, index): (1)
function_base.py (1)
L9 from numpy._core.multiarray import add_docstring (1)
L10 from numpy._core._multiarray_umath import _array_converter (1)
L11 from numpy._core import overrides (1)
_machar.py (2)
L11 from ._ufunc_config import errstate (1)
L12 from .._utils import set_module (1)
getlimits.py (3)
L11 from . import numeric (1)
L14 from .umath import log10, exp2, nextafter, isnan (1)
L17 def _fr0(a): (1)
L25 def _fr1(a): (1)
L33 class MachArLike: (2)
L34 """ Object to simulate MachAr instance """ (1)
L36 ibeta, smallest_subnormal=None, **kwargs): (1)
L35 def __init__(self, ftype, *, eps, epsneg, huge, tiny, (1)
L63 @property (2)
L64 def smallest_subnormal(self): (2)
L87 @property (2)
L88 def _str_smallest_subnormal(self): (2)
L92 def _float_to_float(self, value): (1)
L102 def _float_conv(self, value): (1)
L112 def _float_to_str(self, value): (1)
L124 ntypes.csingle: ntypes.single, (1)
L125 ntypes.complex128: ntypes.float64, (1)
L126 ntypes.clongdouble: ntypes.longdouble (1)
L123 _convert_to_float = { (1)
L130 _title_fmt = 'numpy {} precision floating point number' (1)
L132 ntypes.double: dict( (2)
L133 itype = ntypes.int64, (1)
L134 fmt = '%24.16e', (1)
L135 title = _title_fmt.format('double')), (1)
L136 ntypes.single: dict( (2)
L137 itype = ntypes.int32, (1)
L138 fmt = '%15.7e', (1)
L139 title = _title_fmt.format('single')), (1)
L140 ntypes.longdouble: dict( (2)
L141 itype = ntypes.longlong, (1)
L142 fmt = '%s', (1)
L143 title = _title_fmt.format('long double')), (1)
L144 ntypes.half: dict( (2)
L145 itype = ntypes.int16, (1)
L146 fmt = '%12.5e', (1)
L147 title = _title_fmt.format('half'))} (1)
L131 _MACHAR_PARAMS = { (1)
L159 _KNOWN_TYPES = {} (1)
L160 def _register_type(machar, bytepat): (1)
L164 _float_ma = {} (1)
L167 def _register_known_types(): (1)
L312 def _get_machar(ftype): (1)
L370 def _discovered_machar(ftype): (1)
L384 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L385 class finfo: (2)
L386 """ (1)
L489 _finfo_cache = {} (1)
L491 __class_getitem__ = classmethod(types.GenericAlias) (1)
L493 def __new__(cls, dtype): (1)
L549 def _init(self, dtype): (1)
L575 def __str__(self): (1)
L591 def __repr__(self): (1)
L598 @property (2)
L599 def smallest_normal(self): (2)
L621 @property (2)
L622 def tiny(self): (2)
L639 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L640 class iinfo: (2)
L641 """ (1)
L692 _min_vals = {} (1)
L693 _max_vals = {} (1)
L695 __class_getitem__ = classmethod(types.GenericAlias) (1)
L697 def __init__(self, int_type): (1)
L708 @property (2)
L709 def min(self): (2)
L721 @property (2)
L722 def max(self): (2)
L734 def __str__(self): (1)
L745 def __repr__(self): (1)
_internal.py (2)
L14 from .multiarray import dtype, array, ndarray, promote_types, StringDType (1)
L15 from numpy import _NoValue (1)
_nbit.py (1)
L8 _NBitByte: TypeAlias = _8Bit (1)
L9 _NBitShort: TypeAlias = _16Bit (1)
L10 _NBitIntC: TypeAlias = _32Bit (1)
L11 _NBitIntP: TypeAlias = _32Bit | _64Bit (1)
L12 _NBitInt: TypeAlias = _NBitIntP (1)
L13 _NBitLong: TypeAlias = _32Bit | _64Bit (1)
L14 _NBitLongLong: TypeAlias = _64Bit (1)
L16 _NBitHalf: TypeAlias = _16Bit (1)
L17 _NBitSingle: TypeAlias = _32Bit (1)
L18 _NBitDouble: TypeAlias = _64Bit (1)
L19 _NBitLongDouble: TypeAlias = _64Bit | _96Bit | _128Bit (1)
_dtype_like.py (2)
L15 from ._char_codes import ( (1)
L59 _SCT = TypeVar("_SCT", bound=np.generic) (1)
typing.py (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L197 if allow_special_forms and arg in (ClassVar, Final): (1)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (1)
L201 if type(arg) is tuple: (1)
L203 return arg (1)
L60 _DType_co = TypeVar("_DType_co", covariant=True, bound=np.dtype[Any]) (1)
typing.py (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L197 if allow_special_forms and arg in (ClassVar, Final): (1)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (1)
L201 if type(arg) is tuple: (1)
L203 return arg (1)
L62 _DTypeLikeNested: TypeAlias = Any # TODO: wait for support for recursive types (1)
L66 class _DTypeDictBase(TypedDict): (2)
typing.py (1)
L3324 TypedDict.__mro_entries__ = lambda bases: (_TypedDict,) (1)
L67 names: Sequence[str] (1)
L68 formats: Sequence[_DTypeLikeNested] (1)
typing.py (1)
L3150 for base in bases: (2)
L3151 if type(base) is not _TypedDictMeta and base is not Generic: (1)
L3155 if any(issubclass(b, Generic) for b in bases): (3)
L3158 generic_base = () (1)
L3160 tp_dict = type.__new__(_TypedDictMeta, name, (*generic_base, dict), ns) (1)
L3162 if not hasattr(tp_dict, '__orig_bases__'): (1)
L3165 annotations = {} (1)
L3166 own_annotations = ns.get('__annotations__', {}) (1)
L3167 msg = "TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type" (1)
L3170 for n, tp in own_annotations.items() (4)
L3168 own_annotations = { (2)
L3169 n: _type_check(tp, msg, module=tp_dict.__module__) (2)
L185 invalid_generic_forms = (Generic, Protocol) (2)
L186 if not allow_special_forms: (2)
L187 invalid_generic_forms += (ClassVar,) (2)
L188 if is_argument: (2)
L189 invalid_generic_forms += (Final,) (2)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (2)
L166 if arg is None: (2)
L168 if isinstance(arg, str): (2)
L170 return arg (2)
L192 if (isinstance(arg, _GenericAlias) and (2)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (2)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L3172 required_keys = set() (1)
L3173 optional_keys = set() (1)
L3174 readonly_keys = set() (1)
L3175 mutable_keys = set() (1)
L3177 for base in bases: (2)
L3178 annotations.update(base.__dict__.get('__annotations__', {})) (1)
L3180 base_required = base.__dict__.get('__required_keys__', set()) (1)
L3181 required_keys |= base_required (1)
L3182 optional_keys -= base_required (1)
L3184 base_optional = base.__dict__.get('__optional_keys__', set()) (1)
L3185 required_keys -= base_optional (1)
L3186 optional_keys |= base_optional (1)
L3188 readonly_keys.update(base.__dict__.get('__readonly_keys__', ())) (1)
L3189 mutable_keys.update(base.__dict__.get('__mutable_keys__', ())) (1)
L3191 annotations.update(own_annotations) (1)
L3192 for annotation_key, annotation_type in own_annotations.items(): (3)
L3193 qualifiers = set(_get_typeddict_qualifiers(annotation_type)) (2)
L3120 while True: (2)
L3121 annotation_origin = get_origin(annotation_type) (2)
L2546 if isinstance(tp, _AnnotatedAlias): (2)
L2548 if isinstance(tp, (_BaseGenericAlias, GenericAlias, (4)
L2549 ParamSpecArgs, ParamSpecKwargs)): (2)
L2550 return tp.__origin__ (2)
L3122 if annotation_origin is Annotated: (2)
L3128 elif annotation_origin is Required: (2)
L3131 elif annotation_origin is NotRequired: (2)
L3134 elif annotation_origin is ReadOnly: (2)
L3138 break (2)
L3194 if Required in qualifiers: (2)
L3196 elif NotRequired in qualifiers: (2)
L3199 is_required = total (2)
L3201 if is_required: (2)
L3202 required_keys.add(annotation_key) (2)
L3203 optional_keys.discard(annotation_key) (2)
L3208 if ReadOnly in qualifiers: (2)
L3216 mutable_keys.add(annotation_key) (2)
L3217 readonly_keys.discard(annotation_key) (2)
L3219 assert required_keys.isdisjoint(optional_keys), ( (1)
L3223 tp_dict.__annotations__ = annotations (1)
L3224 tp_dict.__required_keys__ = frozenset(required_keys) (1)
L3225 tp_dict.__optional_keys__ = frozenset(optional_keys) (1)
L3226 tp_dict.__readonly_keys__ = frozenset(readonly_keys) (1)
L3227 tp_dict.__mutable_keys__ = frozenset(mutable_keys) (1)
L3228 tp_dict.__total__ = total (1)
L3229 return tp_dict (1)
L72 class _DTypeDict(_DTypeDictBase, total=False): (2)
L75 offsets: Sequence[int] (1)
L76 titles: Sequence[Any] (1)
L77 itemsize: int (1)
L78 aligned: bool (1)
typing.py (1)
L3150 for base in bases: (2)
L3151 if type(base) is not _TypedDictMeta and base is not Generic: (1)
L3155 if any(issubclass(b, Generic) for b in bases): (3)
L3158 generic_base = () (1)
L3160 tp_dict = type.__new__(_TypedDictMeta, name, (*generic_base, dict), ns) (1)
L3162 if not hasattr(tp_dict, '__orig_bases__'): (1)
L3163 tp_dict.__orig_bases__ = bases (1)
L3165 annotations = {} (1)
L3166 own_annotations = ns.get('__annotations__', {}) (1)
L3167 msg = "TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type" (1)
L3170 for n, tp in own_annotations.items() (6)
L3168 own_annotations = { (2)
L3169 n: _type_check(tp, msg, module=tp_dict.__module__) (4)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L3172 required_keys = set() (1)
L3173 optional_keys = set() (1)
L3174 readonly_keys = set() (1)
L3175 mutable_keys = set() (1)
L3177 for base in bases: (2)
L3178 annotations.update(base.__dict__.get('__annotations__', {})) (1)
L3180 base_required = base.__dict__.get('__required_keys__', set()) (1)
L3181 required_keys |= base_required (1)
L3182 optional_keys -= base_required (1)
L3184 base_optional = base.__dict__.get('__optional_keys__', set()) (1)
L3185 required_keys -= base_optional (1)
L3186 optional_keys |= base_optional (1)
L3188 readonly_keys.update(base.__dict__.get('__readonly_keys__', ())) (1)
L3189 mutable_keys.update(base.__dict__.get('__mutable_keys__', ())) (1)
L3191 annotations.update(own_annotations) (1)
L3192 for annotation_key, annotation_type in own_annotations.items(): (5)
L3193 qualifiers = set(_get_typeddict_qualifiers(annotation_type)) (4)
L3120 while True: (4)
L3121 annotation_origin = get_origin(annotation_type) (4)
L2546 if isinstance(tp, _AnnotatedAlias): (4)
L2548 if isinstance(tp, (_BaseGenericAlias, GenericAlias, (8)
L2549 ParamSpecArgs, ParamSpecKwargs)): (4)
L2550 return tp.__origin__ (2)
L3122 if annotation_origin is Annotated: (4)
L3128 elif annotation_origin is Required: (4)
L3131 elif annotation_origin is NotRequired: (4)
L3134 elif annotation_origin is ReadOnly: (4)
L3138 break (4)
L3194 if Required in qualifiers: (4)
L3196 elif NotRequired in qualifiers: (4)
L3199 is_required = total (4)
L3201 if is_required: (4)
L3205 optional_keys.add(annotation_key) (4)
L3206 required_keys.discard(annotation_key) (4)
L3208 if ReadOnly in qualifiers: (4)
L3216 mutable_keys.add(annotation_key) (4)
L3217 readonly_keys.discard(annotation_key) (4)
L2551 if tp is Generic: (2)
L2553 if isinstance(tp, types.UnionType): (2)
L2555 return None (2)
L3219 assert required_keys.isdisjoint(optional_keys), ( (1)
L3223 tp_dict.__annotations__ = annotations (1)
L3224 tp_dict.__required_keys__ = frozenset(required_keys) (1)
L3225 tp_dict.__optional_keys__ = frozenset(optional_keys) (1)
L3226 tp_dict.__readonly_keys__ = frozenset(readonly_keys) (1)
L3227 tp_dict.__mutable_keys__ = frozenset(mutable_keys) (1)
L3228 tp_dict.__total__ = total (1)
L3229 return tp_dict (1)
L82 @runtime_checkable (3)
typing.py (1)
L2348 if not issubclass(cls, Generic) or not getattr(cls, '_is_protocol', False): (1)
L2351 cls._is_runtime_protocol = True (1)
L2356 cls.__non_callable_proto_members__ = set() (1)
L2357 for attr in cls.__protocol_attrs__: (2)
L2358 try: (1)
L2359 is_callable = callable(getattr(cls, attr, None)) (1)
L2366 if not is_callable: (1)
L2367 cls.__non_callable_proto_members__.add(attr) (1)
L2368 return cls (1)
L83 class _SupportsDType(Protocol[_DType_co]): (2)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1226 if not args: (1)
L1230 if not all(_is_typevar_like(p) for p in args): (3)
L1128 return isinstance(x, (TypeVar, ParamSpec)) or _is_unpacked_typevartuple(x) (1)
L1234 if len(set(args)) != len(args): (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L288 if t not in parameters: (1)
L289 if enforce_default_ordering: (1)
L290 if type_var_tuple_encountered and t.has_default(): (1)
L294 if t.has_default(): (1)
L296 elif default_encountered: (1)
L300 parameters.append(t) (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L1600 if isinstance(self.__origin__, _SpecialForm): (1)
L1603 if self._name: # generic version of an ABC or built-in class (1)
L1605 if self.__origin__ is Generic: (1)
L1612 return (self.__origin__,) (1)
L84 @property (2)
L85 def dtype(self) -> _DType_co: ... (2)
typing.py (1)
L2055 if name == "Protocol" and bases == (Generic,): (1)
L2057 elif Protocol in bases: (1)
L2058 for base in bases: (2)
L2060 base in {object, Generic} (1)
L2061 or base.__name__ in _PROTO_ALLOWLIST.get(base.__module__, []) (1)
L2063 issubclass(base, Generic) (1)
L2064 and getattr(base, "_is_protocol", False) (1)
L2071 return super().__new__(mcls, name, bases, namespace, **kwargs) (1)
<frozen abc> (1)
L106 (1)
L2200 super().__init_subclass__(*args, **kwargs) (1)
L1257 super(Generic, cls).__init_subclass__(*args, **kwargs) (1)
L1258 tvars = [] (1)
L1259 if '__orig_bases__' in cls.__dict__: (1)
L1260 error = Generic in cls.__orig_bases__ (1)
L1438 if not isinstance(other, _GenericAlias): (1)
L1439 return NotImplemented (1)
L1265 if error: (1)
L1267 if '__orig_bases__' in cls.__dict__: (1)
L1268 tvars = _collect_type_parameters(cls.__orig_bases__) (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1295 return attr.startswith('__') and attr.endswith('__') (2)
L1366 raise AttributeError(attr) (2)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (2)
L305 if x not in parameters: (1)
L306 parameters.append(x) (1)
L307 return tuple(parameters) (1)
L1274 gvars = None (1)
L1275 for base in cls.__orig_bases__: (2)
L1276 if (isinstance(base, _GenericAlias) and (1)
L1277 base.__origin__ is Generic): (1)
L1282 if gvars is not None: (1)
L1291 cls.__parameters__ = tuple(tvars) (1)
L2203 if not cls.__dict__.get('_is_protocol', False): (1)
L2204 cls._is_protocol = any(b is Protocol for b in cls.__bases__) (2)
L2207 if '__subclasshook__' not in cls.__dict__: (1)
L2208 cls.__subclasshook__ = _proto_hook (1)
L2211 if cls._is_protocol and cls.__init__ is Protocol.__init__: (1)
L2212 cls.__init__ = _no_init_or_replace_init (1)
<frozen abc> (1)
L107 (1)
L108 (1)
L2074 super().__init__(*args, **kwargs) (1)
L2075 if getattr(cls, "_is_protocol", False): (1)
L2076 cls.__protocol_attrs__ = _get_protocol_attrs(cls) (1)
L1933 attrs = set() (1)
L1934 for base in cls.__mro__[:-1]: # without object (4)
L1935 if base.__name__ in {'Protocol', 'Generic'}: (3)
L1937 annotations = getattr(base, '__annotations__', {}) (1)
L1938 for attr in (*base.__dict__, *annotations): (16)
L1939 if not attr.startswith('_abc_') and attr not in EXCLUDED_ATTRIBUTES: (15)
L1940 attrs.add(attr) (1)
L1936 continue (2)
L1941 return attrs (1)
L90 np.dtype[_SCT] (3)
typing.py (1)
L1450 return Union[left, self] (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1444 return hash((self.__origin__, self.__args__)) (2)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (4)
L185 invalid_generic_forms = (Generic, Protocol) (2)
L186 if not allow_special_forms: (2)
L187 invalid_generic_forms += (ClassVar,) (2)
L188 if is_argument: (2)
L189 invalid_generic_forms += (Final,) (2)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (2)
L166 if arg is None: (2)
L168 if isinstance(arg, str): (2)
L170 return arg (2)
L192 if (isinstance(arg, _GenericAlias) and (2)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (2)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L193 arg.__origin__ in invalid_generic_forms): (1)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (3)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (2)
L388 params.extend(p.__args__) (1)
L390 params.append(p) (1)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (9)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (9)
L1428 a for a in args) (8)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (4)
L277 if isinstance(t, type): (3)
L280 elif isinstance(t, tuple): (3)
L287 elif hasattr(t, '__typing_subst__'): (3)
L302 if _is_unpacked_typevartuple(t): (3)
L1123 return ((not isinstance(x, type)) and (6)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (3)
L304 for x in getattr(t, '__parameters__', ()): (6)
L305 if x not in parameters: (3)
L306 parameters.append(x) (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1366 raise AttributeError(attr) (2)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L91 | type[_SCT] (1)
L92 | _SupportsDType[np.dtype[_SCT]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (2)
L305 if x not in parameters: (1)
L306 parameters.append(x) (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L89 _DTypeLike: TypeAlias = ( (1)
L99 tuple[_DTypeLikeNested, int] (5)
L101 | tuple[_DTypeLikeNested, _ShapeLike] (1)
L107 | list[Any] (1)
L110 | _DTypeDict (1)
L112 | tuple[_DTypeLikeNested, _DTypeLikeNested] (1)
L97 _VoidDTypeLike: TypeAlias = ( (1)
L118 np.dtype[Any] (6)
typing.py (3)
L1450 return Union[left, self] (1)
L428 try: (3)
L429 return _caches[func](*args, **kwds) (3)
L1444 return hash((self.__origin__, self.__args__)) (6)
L576 return self._getitem(self, parameters) (3)
L784 if parameters == (): (3)
L786 if not isinstance(parameters, tuple): (3)
L788 msg = "Union[arg, ...]: each arg must be a type." (3)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (12)
L185 invalid_generic_forms = (Generic, Protocol) (6)
L186 if not allow_special_forms: (6)
L187 invalid_generic_forms += (ClassVar,) (6)
L188 if is_argument: (6)
L189 invalid_generic_forms += (Final,) (6)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (6)
L166 if arg is None: (6)
L168 if isinstance(arg, str): (6)
L170 return arg (6)
L192 if (isinstance(arg, _GenericAlias) and (6)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (6)
L197 if allow_special_forms and arg in (ClassVar, Final): (6)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (6)
L201 if type(arg) is tuple: (6)
L203 return arg (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (3)
L385 params = [] (3)
L386 for p in parameters: (9)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (6)
L388 params.extend(p.__args__) (4)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (3)
L353 try: (3)
L354 return dict.fromkeys(params) (3)
L791 if len(parameters) == 1: (3)
L793 if len(parameters) == 2 and type(None) in parameters: (3)
L795 return _UnionGenericAlias(self, parameters) (3)
L1424 super().__init__(origin, inst=inst, name=name) (3)
L1308 self._inst = inst (3)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (21)
L1295 return attr.startswith('__') and attr.endswith('__') (27)
L1370 super().__setattr__(attr, val) (21)
L1309 self._name = name (3)
L1310 self.__origin__ = origin (3)
L1311 self.__slots__ = None # This is not documented. (3)
L1425 if not isinstance(args, tuple): (3)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (47)
L1428 a for a in args) (44)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (3)
L1430 self.__parameters__ = _collect_type_parameters( (6)
L1431 args, (3)
L1432 enforce_default_ordering=enforce_default_ordering, (3)
L272 default_encountered = False (3)
L274 type_var_tuple_encountered = False (3)
L275 parameters = [] (3)
L276 for t in args: (22)
L277 if isinstance(t, type): (19)
L280 elif isinstance(t, tuple): (13)
L287 elif hasattr(t, '__typing_subst__'): (13)
L302 if _is_unpacked_typevartuple(t): (13)
L1123 return ((not isinstance(x, type)) and (26)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (13)
L304 for x in getattr(t, '__parameters__', ()): (13)
L279 pass (6)
L1359 if attr in {'__name__', '__qualname__'}: (6)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (6)
L1366 raise AttributeError(attr) (6)
L307 return tuple(parameters) (3)
L1434 if not name: (3)
L1435 self.__module__ = origin.__module__ (3)
L1447 return Union[self, right] (2)
L1774 return hash(frozenset(self.__args__)) (2)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (16)
L1767 return NotImplemented (16)
L120 | None (1)
L122 | type[Any] # NOTE: We're stuck with `type[Any]` due to object dtypes (1)
L124 | _SupportsDType[np.dtype[Any]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L126 | str (1)
L127 | _VoidDTypeLike (1)
L117 DTypeLike: TypeAlias = ( (1)
L140 type[bool] (5)
typing.py (2)
L1450 return Union[left, self] (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (4)
L576 return self._getitem(self, parameters) (2)
L784 if parameters == (): (2)
L786 if not isinstance(parameters, tuple): (2)
L788 msg = "Union[arg, ...]: each arg must be a type." (2)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (8)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (2)
L385 params = [] (2)
L386 for p in parameters: (6)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L388 params.extend(p.__args__) (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (2)
L353 try: (2)
L354 return dict.fromkeys(params) (2)
L791 if len(parameters) == 1: (2)
L793 if len(parameters) == 2 and type(None) in parameters: (2)
L795 return _UnionGenericAlias(self, parameters) (2)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (20)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (24)
L1428 a for a in args) (22)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (11)
L277 if isinstance(t, type): (9)
L280 elif isinstance(t, tuple): (9)
L287 elif hasattr(t, '__typing_subst__'): (9)
L302 if _is_unpacked_typevartuple(t): (9)
L1123 return ((not isinstance(x, type)) and (18)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (9)
L304 for x in getattr(t, '__parameters__', ()): (9)
L1359 if attr in {'__name__', '__qualname__'}: (6)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (6)
L1366 raise AttributeError(attr) (6)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1774 return hash(frozenset(self.__args__)) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (18)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (8)
L1767 return NotImplemented (8)
L1808 if not isinstance(other, _LiteralGenericAlias): (8)
L1809 return NotImplemented (8)
L141 | type[np.bool] (1)
L142 | np.dtype[np.bool] (1)
L143 | _SupportsDType[np.dtype[np.bool]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L144 | _BoolCodes (1)
L139 _DTypeLikeBool: TypeAlias = ( (1)
L147 type[np.unsignedinteger[Any]] (14)
typing.py (12)
L1450 return Union[left, self] (1)
L428 try: (12)
L429 return _caches[func](*args, **kwds) (12)
L1444 return hash((self.__origin__, self.__args__)) (24)
L576 return self._getitem(self, parameters) (12)
L784 if parameters == (): (12)
L786 if not isinstance(parameters, tuple): (12)
L788 msg = "Union[arg, ...]: each arg must be a type." (12)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (48)
L185 invalid_generic_forms = (Generic, Protocol) (24)
L186 if not allow_special_forms: (24)
L187 invalid_generic_forms += (ClassVar,) (24)
L188 if is_argument: (24)
L189 invalid_generic_forms += (Final,) (24)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (24)
L166 if arg is None: (24)
L168 if isinstance(arg, str): (24)
L170 return arg (24)
L192 if (isinstance(arg, _GenericAlias) and (24)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (24)
L197 if allow_special_forms and arg in (ClassVar, Final): (24)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (24)
L201 if type(arg) is tuple: (24)
L203 return arg (24)
L193 arg.__origin__ in invalid_generic_forms): (23)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (12)
L385 params = [] (12)
L386 for p in parameters: (36)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (24)
L388 params.extend(p.__args__) (12)
L390 params.append(p) (12)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (12)
L353 try: (12)
L354 return dict.fromkeys(params) (12)
L791 if len(parameters) == 1: (12)
L793 if len(parameters) == 2 and type(None) in parameters: (12)
L795 return _UnionGenericAlias(self, parameters) (12)
L1424 super().__init__(origin, inst=inst, name=name) (12)
L1308 self._inst = inst (12)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (84)
L1295 return attr.startswith('__') and attr.endswith('__') (238)
L1370 super().__setattr__(attr, val) (84)
L1309 self._name = name (12)
L1310 self.__origin__ = origin (12)
L1311 self.__slots__ = None # This is not documented. (12)
L1425 if not isinstance(args, tuple): (12)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (238)
L1428 a for a in args) (226)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (12)
L1430 self.__parameters__ = _collect_type_parameters( (24)
L1431 args, (12)
L1432 enforce_default_ordering=enforce_default_ordering, (12)
L272 default_encountered = False (12)
L274 type_var_tuple_encountered = False (12)
L275 parameters = [] (12)
L276 for t in args: (113)
L277 if isinstance(t, type): (101)
L280 elif isinstance(t, tuple): (101)
L287 elif hasattr(t, '__typing_subst__'): (101)
L302 if _is_unpacked_typevartuple(t): (101)
L1123 return ((not isinstance(x, type)) and (202)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (101)
L304 for x in getattr(t, '__parameters__', ()): (101)
L1359 if attr in {'__name__', '__qualname__'}: (154)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (154)
L1366 raise AttributeError(attr) (154)
L307 return tuple(parameters) (12)
L1434 if not name: (12)
L1435 self.__module__ = origin.__module__ (12)
L1447 return Union[self, right] (11)
L1774 return hash(frozenset(self.__args__)) (11)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (132)
L1803 return ((p, type(p)) for p in parameters) (1062)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (88)
L1767 return NotImplemented (88)
L1808 if not isinstance(other, _LiteralGenericAlias): (88)
L1809 return NotImplemented (88)
L148 | np.dtype[np.unsignedinteger[Any]] (1)
L149 | _SupportsDType[np.dtype[np.unsignedinteger[Any]]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L150 | _UInt8Codes (1)
L151 | _UInt16Codes (1)
L152 | _UInt32Codes (1)
L153 | _UInt64Codes (1)
L154 | _UByteCodes (1)
L155 | _UShortCodes (1)
L156 | _UIntCCodes (1)
L157 | _LongCodes (1)
L158 | _ULongLongCodes (1)
L159 | _UIntPCodes (1)
L160 | _UIntCodes (1)
L146 _DTypeLikeUInt: TypeAlias = ( (1)
L163 type[int] (15)
typing.py (12)
L1450 return Union[left, self] (1)
L428 try: (12)
L429 return _caches[func](*args, **kwds) (12)
L1444 return hash((self.__origin__, self.__args__)) (24)
L576 return self._getitem(self, parameters) (12)
L784 if parameters == (): (12)
L786 if not isinstance(parameters, tuple): (12)
L788 msg = "Union[arg, ...]: each arg must be a type." (12)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (48)
L185 invalid_generic_forms = (Generic, Protocol) (24)
L186 if not allow_special_forms: (24)
L187 invalid_generic_forms += (ClassVar,) (24)
L188 if is_argument: (24)
L189 invalid_generic_forms += (Final,) (24)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (24)
L166 if arg is None: (24)
L168 if isinstance(arg, str): (24)
L170 return arg (24)
L192 if (isinstance(arg, _GenericAlias) and (24)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (24)
L197 if allow_special_forms and arg in (ClassVar, Final): (24)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (24)
L201 if type(arg) is tuple: (24)
L203 return arg (24)
L193 arg.__origin__ in invalid_generic_forms): (23)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (12)
L385 params = [] (12)
L386 for p in parameters: (36)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (24)
L388 params.extend(p.__args__) (12)
L390 params.append(p) (12)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (12)
L353 try: (12)
L354 return dict.fromkeys(params) (12)
L791 if len(parameters) == 1: (12)
L793 if len(parameters) == 2 and type(None) in parameters: (12)
L795 return _UnionGenericAlias(self, parameters) (12)
L1424 super().__init__(origin, inst=inst, name=name) (12)
L1308 self._inst = inst (12)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (84)
L1295 return attr.startswith('__') and attr.endswith('__') (238)
L1370 super().__setattr__(attr, val) (84)
L1309 self._name = name (12)
L1310 self.__origin__ = origin (12)
L1311 self.__slots__ = None # This is not documented. (12)
L1425 if not isinstance(args, tuple): (12)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (262)
L1428 a for a in args) (250)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (12)
L1430 self.__parameters__ = _collect_type_parameters( (24)
L1431 args, (12)
L1432 enforce_default_ordering=enforce_default_ordering, (12)
L272 default_encountered = False (12)
L274 type_var_tuple_encountered = False (12)
L275 parameters = [] (12)
L276 for t in args: (125)
L277 if isinstance(t, type): (113)
L280 elif isinstance(t, tuple): (113)
L287 elif hasattr(t, '__typing_subst__'): (113)
L302 if _is_unpacked_typevartuple(t): (113)
L1123 return ((not isinstance(x, type)) and (226)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (113)
L304 for x in getattr(t, '__parameters__', ()): (113)
L1359 if attr in {'__name__', '__qualname__'}: (154)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (154)
L1366 raise AttributeError(attr) (154)
L307 return tuple(parameters) (12)
L1434 if not name: (12)
L1435 self.__module__ = origin.__module__ (12)
L1447 return Union[self, right] (11)
L1774 return hash(frozenset(self.__args__)) (11)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (132)
L1803 return ((p, type(p)) for p in parameters) (1068)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (88)
L1767 return NotImplemented (88)
L1808 if not isinstance(other, _LiteralGenericAlias): (88)
L1809 return NotImplemented (88)
L164 | type[np.signedinteger[Any]] (1)
L165 | np.dtype[np.signedinteger[Any]] (1)
L166 | _SupportsDType[np.dtype[np.signedinteger[Any]]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L167 | _Int8Codes (1)
L168 | _Int16Codes (1)
L169 | _Int32Codes (1)
L170 | _Int64Codes (1)
L171 | _ByteCodes (1)
L172 | _ShortCodes (1)
L173 | _IntCCodes (1)
L174 | _LongCodes (1)
L175 | _LongLongCodes (1)
L176 | _IntPCodes (1)
L177 | _IntCodes (1)
L162 _DTypeLikeInt: TypeAlias = ( (1)
L180 type[float] (11)
typing.py (8)
L1450 return Union[left, self] (1)
L428 try: (8)
L429 return _caches[func](*args, **kwds) (8)
L1444 return hash((self.__origin__, self.__args__)) (16)
L576 return self._getitem(self, parameters) (8)
L784 if parameters == (): (8)
L786 if not isinstance(parameters, tuple): (8)
L788 msg = "Union[arg, ...]: each arg must be a type." (8)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (32)
L185 invalid_generic_forms = (Generic, Protocol) (16)
L186 if not allow_special_forms: (16)
L187 invalid_generic_forms += (ClassVar,) (16)
L188 if is_argument: (16)
L189 invalid_generic_forms += (Final,) (16)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (16)
L166 if arg is None: (16)
L168 if isinstance(arg, str): (16)
L170 return arg (16)
L192 if (isinstance(arg, _GenericAlias) and (16)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (16)
L197 if allow_special_forms and arg in (ClassVar, Final): (16)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (16)
L201 if type(arg) is tuple: (16)
L203 return arg (16)
L193 arg.__origin__ in invalid_generic_forms): (15)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (8)
L385 params = [] (8)
L386 for p in parameters: (24)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (16)
L388 params.extend(p.__args__) (8)
L390 params.append(p) (8)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (8)
L353 try: (8)
L354 return dict.fromkeys(params) (8)
L791 if len(parameters) == 1: (8)
L793 if len(parameters) == 2 and type(None) in parameters: (8)
L795 return _UnionGenericAlias(self, parameters) (8)
L1424 super().__init__(origin, inst=inst, name=name) (8)
L1308 self._inst = inst (8)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (56)
L1295 return attr.startswith('__') and attr.endswith('__') (128)
L1370 super().__setattr__(attr, val) (56)
L1309 self._name = name (8)
L1310 self.__origin__ = origin (8)
L1311 self.__slots__ = None # This is not documented. (8)
L1425 if not isinstance(args, tuple): (8)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (144)
L1428 a for a in args) (136)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (8)
L1430 self.__parameters__ = _collect_type_parameters( (16)
L1431 args, (8)
L1432 enforce_default_ordering=enforce_default_ordering, (8)
L272 default_encountered = False (8)
L274 type_var_tuple_encountered = False (8)
L275 parameters = [] (8)
L276 for t in args: (68)
L277 if isinstance(t, type): (60)
L280 elif isinstance(t, tuple): (60)
L287 elif hasattr(t, '__typing_subst__'): (60)
L302 if _is_unpacked_typevartuple(t): (60)
L1123 return ((not isinstance(x, type)) and (120)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (60)
L304 for x in getattr(t, '__parameters__', ()): (60)
L1359 if attr in {'__name__', '__qualname__'}: (72)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (72)
L1366 raise AttributeError(attr) (72)
L307 return tuple(parameters) (8)
L1434 if not name: (8)
L1435 self.__module__ = origin.__module__ (8)
L1447 return Union[self, right] (7)
L1774 return hash(frozenset(self.__args__)) (7)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (56)
L1803 return ((p, type(p)) for p in parameters) (452)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (56)
L1767 return NotImplemented (56)
L1808 if not isinstance(other, _LiteralGenericAlias): (56)
L1809 return NotImplemented (56)
L181 | type[np.floating[Any]] (1)
L182 | np.dtype[np.floating[Any]] (1)
L183 | _SupportsDType[np.dtype[np.floating[Any]]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L184 | _Float16Codes (1)
L185 | _Float32Codes (1)
L186 | _Float64Codes (1)
L187 | _HalfCodes (1)
L188 | _SingleCodes (1)
L189 | _DoubleCodes (1)
L190 | _LongDoubleCodes (1)
L179 _DTypeLikeFloat: TypeAlias = ( (1)
L193 type[complex] (9)
typing.py (6)
L1450 return Union[left, self] (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1444 return hash((self.__origin__, self.__args__)) (12)
L576 return self._getitem(self, parameters) (6)
L784 if parameters == (): (6)
L786 if not isinstance(parameters, tuple): (6)
L788 msg = "Union[arg, ...]: each arg must be a type." (6)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (24)
L185 invalid_generic_forms = (Generic, Protocol) (12)
L186 if not allow_special_forms: (12)
L187 invalid_generic_forms += (ClassVar,) (12)
L188 if is_argument: (12)
L189 invalid_generic_forms += (Final,) (12)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (12)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L192 if (isinstance(arg, _GenericAlias) and (12)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (12)
L197 if allow_special_forms and arg in (ClassVar, Final): (12)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (12)
L201 if type(arg) is tuple: (12)
L203 return arg (12)
L193 arg.__origin__ in invalid_generic_forms): (11)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (6)
L385 params = [] (6)
L386 for p in parameters: (18)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (12)
L388 params.extend(p.__args__) (6)
L390 params.append(p) (6)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (6)
L353 try: (6)
L354 return dict.fromkeys(params) (6)
L791 if len(parameters) == 1: (6)
L793 if len(parameters) == 2 and type(None) in parameters: (6)
L795 return _UnionGenericAlias(self, parameters) (6)
L1424 super().__init__(origin, inst=inst, name=name) (6)
L1308 self._inst = inst (6)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (42)
L1295 return attr.startswith('__') and attr.endswith('__') (84)
L1370 super().__setattr__(attr, val) (42)
L1309 self._name = name (6)
L1310 self.__origin__ = origin (6)
L1311 self.__slots__ = None # This is not documented. (6)
L1425 if not isinstance(args, tuple): (6)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (96)
L1428 a for a in args) (90)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (6)
L1430 self.__parameters__ = _collect_type_parameters( (12)
L1431 args, (6)
L1432 enforce_default_ordering=enforce_default_ordering, (6)
L272 default_encountered = False (6)
L274 type_var_tuple_encountered = False (6)
L275 parameters = [] (6)
L276 for t in args: (45)
L277 if isinstance(t, type): (39)
L280 elif isinstance(t, tuple): (39)
L287 elif hasattr(t, '__typing_subst__'): (39)
L302 if _is_unpacked_typevartuple(t): (39)
L1123 return ((not isinstance(x, type)) and (78)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (39)
L304 for x in getattr(t, '__parameters__', ()): (39)
L1359 if attr in {'__name__', '__qualname__'}: (42)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (42)
L1366 raise AttributeError(attr) (42)
L307 return tuple(parameters) (6)
L1434 if not name: (6)
L1435 self.__module__ = origin.__module__ (6)
L1447 return Union[self, right] (5)
L1774 return hash(frozenset(self.__args__)) (5)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (30)
L1803 return ((p, type(p)) for p in parameters) (244)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (40)
L1767 return NotImplemented (40)
L1808 if not isinstance(other, _LiteralGenericAlias): (40)
L1809 return NotImplemented (40)
L194 | type[np.complexfloating[Any]] (1)
L195 | np.dtype[np.complexfloating[Any]] (1)
L196 | _SupportsDType[np.dtype[np.complexfloating[Any]]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L197 | _Complex64Codes (1)
L198 | _Complex128Codes (1)
L199 | _CSingleCodes (1)
L200 | _CDoubleCodes (1)
L201 | _CLongDoubleCodes (1)
L192 _DTypeLikeComplex: TypeAlias = ( (1)
L204 type[np.timedelta64] (4)
typing.py (2)
L1450 return Union[left, self] (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (4)
L576 return self._getitem(self, parameters) (2)
L784 if parameters == (): (2)
L786 if not isinstance(parameters, tuple): (2)
L788 msg = "Union[arg, ...]: each arg must be a type." (2)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (8)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (2)
L385 params = [] (2)
L386 for p in parameters: (6)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L388 params.extend(p.__args__) (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (2)
L353 try: (2)
L354 return dict.fromkeys(params) (2)
L791 if len(parameters) == 1: (2)
L793 if len(parameters) == 2 and type(None) in parameters: (2)
L795 return _UnionGenericAlias(self, parameters) (2)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (20)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (20)
L1428 a for a in args) (18)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (9)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L1359 if attr in {'__name__', '__qualname__'}: (6)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (6)
L1366 raise AttributeError(attr) (6)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1774 return hash(frozenset(self.__args__)) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (294)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (8)
L1767 return NotImplemented (8)
L1808 if not isinstance(other, _LiteralGenericAlias): (8)
L1809 return NotImplemented (8)
L205 | np.dtype[np.timedelta64] (1)
L206 | _SupportsDType[np.dtype[np.timedelta64]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L207 | _TD64Codes (1)
L203 _DTypeLikeDT64: TypeAlias = ( (1)
L210 type[np.datetime64] (4)
typing.py (2)
L1450 return Union[left, self] (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (4)
L576 return self._getitem(self, parameters) (2)
L784 if parameters == (): (2)
L786 if not isinstance(parameters, tuple): (2)
L788 msg = "Union[arg, ...]: each arg must be a type." (2)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (8)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (2)
L385 params = [] (2)
L386 for p in parameters: (6)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L388 params.extend(p.__args__) (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (2)
L353 try: (2)
L354 return dict.fromkeys(params) (2)
L791 if len(parameters) == 1: (2)
L793 if len(parameters) == 2 and type(None) in parameters: (2)
L795 return _UnionGenericAlias(self, parameters) (2)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (20)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (20)
L1428 a for a in args) (18)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (9)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L1359 if attr in {'__name__', '__qualname__'}: (6)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (6)
L1366 raise AttributeError(attr) (6)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1774 return hash(frozenset(self.__args__)) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (294)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (8)
L1767 return NotImplemented (8)
L1808 if not isinstance(other, _LiteralGenericAlias): (8)
L1809 return NotImplemented (8)
L211 | np.dtype[np.datetime64] (1)
L212 | _SupportsDType[np.dtype[np.datetime64]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L213 | _DT64Codes (1)
L209 _DTypeLikeTD64: TypeAlias = ( (1)
L216 type[str] (5)
typing.py (2)
L1450 return Union[left, self] (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (4)
L576 return self._getitem(self, parameters) (2)
L784 if parameters == (): (2)
L786 if not isinstance(parameters, tuple): (2)
L788 msg = "Union[arg, ...]: each arg must be a type." (2)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (8)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (2)
L385 params = [] (2)
L386 for p in parameters: (6)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L388 params.extend(p.__args__) (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (2)
L353 try: (2)
L354 return dict.fromkeys(params) (2)
L791 if len(parameters) == 1: (2)
L793 if len(parameters) == 2 and type(None) in parameters: (2)
L795 return _UnionGenericAlias(self, parameters) (2)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (20)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (24)
L1428 a for a in args) (22)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (11)
L277 if isinstance(t, type): (9)
L280 elif isinstance(t, tuple): (9)
L287 elif hasattr(t, '__typing_subst__'): (9)
L302 if _is_unpacked_typevartuple(t): (9)
L1123 return ((not isinstance(x, type)) and (18)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (9)
L304 for x in getattr(t, '__parameters__', ()): (9)
L1359 if attr in {'__name__', '__qualname__'}: (6)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (6)
L1366 raise AttributeError(attr) (6)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1774 return hash(frozenset(self.__args__)) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (20)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (8)
L1767 return NotImplemented (8)
L1808 if not isinstance(other, _LiteralGenericAlias): (8)
L1809 return NotImplemented (8)
L217 | type[np.str_] (1)
L218 | np.dtype[np.str_] (1)
L219 | _SupportsDType[np.dtype[np.str_]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L220 | _StrCodes (1)
L215 _DTypeLikeStr: TypeAlias = ( (1)
L223 type[bytes] (5)
typing.py (2)
L1450 return Union[left, self] (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (4)
L576 return self._getitem(self, parameters) (2)
L784 if parameters == (): (2)
L786 if not isinstance(parameters, tuple): (2)
L788 msg = "Union[arg, ...]: each arg must be a type." (2)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (8)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (2)
L385 params = [] (2)
L386 for p in parameters: (6)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L388 params.extend(p.__args__) (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (2)
L353 try: (2)
L354 return dict.fromkeys(params) (2)
L791 if len(parameters) == 1: (2)
L793 if len(parameters) == 2 and type(None) in parameters: (2)
L795 return _UnionGenericAlias(self, parameters) (2)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (20)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (24)
L1428 a for a in args) (22)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (11)
L277 if isinstance(t, type): (9)
L280 elif isinstance(t, tuple): (9)
L287 elif hasattr(t, '__typing_subst__'): (9)
L302 if _is_unpacked_typevartuple(t): (9)
L1123 return ((not isinstance(x, type)) and (18)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (9)
L304 for x in getattr(t, '__parameters__', ()): (9)
L1359 if attr in {'__name__', '__qualname__'}: (6)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (6)
L1366 raise AttributeError(attr) (6)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1774 return hash(frozenset(self.__args__)) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (18)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (8)
L1767 return NotImplemented (8)
L1808 if not isinstance(other, _LiteralGenericAlias): (8)
L1809 return NotImplemented (8)
L224 | type[np.bytes_] (1)
L225 | np.dtype[np.bytes_] (1)
L226 | _SupportsDType[np.dtype[np.bytes_]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L227 | _BytesCodes (1)
L222 _DTypeLikeBytes: TypeAlias = ( (1)
L230 type[np.void] (5)
typing.py (3)
L1450 return Union[left, self] (1)
L428 try: (3)
L429 return _caches[func](*args, **kwds) (3)
L1444 return hash((self.__origin__, self.__args__)) (6)
L576 return self._getitem(self, parameters) (3)
L784 if parameters == (): (3)
L786 if not isinstance(parameters, tuple): (3)
L788 msg = "Union[arg, ...]: each arg must be a type." (3)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (12)
L185 invalid_generic_forms = (Generic, Protocol) (6)
L186 if not allow_special_forms: (6)
L187 invalid_generic_forms += (ClassVar,) (6)
L188 if is_argument: (6)
L189 invalid_generic_forms += (Final,) (6)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (6)
L166 if arg is None: (6)
L168 if isinstance(arg, str): (6)
L170 return arg (6)
L192 if (isinstance(arg, _GenericAlias) and (6)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (6)
L197 if allow_special_forms and arg in (ClassVar, Final): (6)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (6)
L201 if type(arg) is tuple: (6)
L203 return arg (6)
L193 arg.__origin__ in invalid_generic_forms): (4)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (3)
L385 params = [] (3)
L386 for p in parameters: (9)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (6)
L388 params.extend(p.__args__) (4)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (3)
L353 try: (3)
L354 return dict.fromkeys(params) (3)
L791 if len(parameters) == 1: (3)
L793 if len(parameters) == 2 and type(None) in parameters: (3)
L795 return _UnionGenericAlias(self, parameters) (3)
L1424 super().__init__(origin, inst=inst, name=name) (3)
L1308 self._inst = inst (3)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (21)
L1295 return attr.startswith('__') and attr.endswith('__') (31)
L1370 super().__setattr__(attr, val) (21)
L1309 self._name = name (3)
L1310 self.__origin__ = origin (3)
L1311 self.__slots__ = None # This is not documented. (3)
L1425 if not isinstance(args, tuple): (3)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (41)
L1428 a for a in args) (38)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (3)
L1430 self.__parameters__ = _collect_type_parameters( (6)
L1431 args, (3)
L1432 enforce_default_ordering=enforce_default_ordering, (3)
L272 default_encountered = False (3)
L274 type_var_tuple_encountered = False (3)
L275 parameters = [] (3)
L276 for t in args: (19)
L277 if isinstance(t, type): (16)
L280 elif isinstance(t, tuple): (15)
L287 elif hasattr(t, '__typing_subst__'): (15)
L302 if _is_unpacked_typevartuple(t): (15)
L1123 return ((not isinstance(x, type)) and (30)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (15)
L304 for x in getattr(t, '__parameters__', ()): (15)
L1359 if attr in {'__name__', '__qualname__'}: (10)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (10)
L1366 raise AttributeError(attr) (10)
L307 return tuple(parameters) (3)
L1434 if not name: (3)
L1435 self.__module__ = origin.__module__ (3)
L1447 return Union[self, right] (2)
L1774 return hash(frozenset(self.__args__)) (2)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (4)
L1803 return ((p, type(p)) for p in parameters) (32)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (16)
L1767 return NotImplemented (16)
L1808 if not isinstance(other, _LiteralGenericAlias): (8)
L1809 return NotImplemented (8)
L279 pass (1)
L231 | np.dtype[np.void] (1)
L232 | _SupportsDType[np.dtype[np.void]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L233 | _VoidCodes (1)
L234 | _VoidDTypeLike (1)
L229 _DTypeLikeVoid: TypeAlias = ( (1)
L237 type (4)
typing.py (2)
L1450 return Union[left, self] (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (4)
L576 return self._getitem(self, parameters) (2)
L784 if parameters == (): (2)
L786 if not isinstance(parameters, tuple): (2)
L788 msg = "Union[arg, ...]: each arg must be a type." (2)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (8)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (8)
L1439 return NotImplemented (8)
L790 parameters = _remove_dups_flatten(parameters) (2)
L385 params = [] (2)
L386 for p in parameters: (6)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L388 params.extend(p.__args__) (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (2)
L353 try: (2)
L354 return dict.fromkeys(params) (2)
L791 if len(parameters) == 1: (2)
L793 if len(parameters) == 2 and type(None) in parameters: (2)
L795 return _UnionGenericAlias(self, parameters) (2)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (20)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (20)
L1428 a for a in args) (18)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (9)
L277 if isinstance(t, type): (7)
L279 pass (2)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L1123 return ((not isinstance(x, type)) and (10)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L1359 if attr in {'__name__', '__qualname__'}: (6)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (6)
L1366 raise AttributeError(attr) (6)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1774 return hash(frozenset(self.__args__)) (1)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (2)
L1803 return ((p, type(p)) for p in parameters) (18)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (8)
L1767 return NotImplemented (8)
L1808 if not isinstance(other, _LiteralGenericAlias): (8)
L1809 return NotImplemented (8)
L238 | np.dtype[np.object_] (1)
L239 | _SupportsDType[np.dtype[np.object_]] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L240 | _ObjectCodes (1)
L236 _DTypeLikeObject: TypeAlias = ( (1)
L244 _DTypeLikeBool (5)
typing.py (4)
L1447 return Union[self, right] (4)
L428 try: (4)
L429 return _caches[func](*args, **kwds) (4)
L1774 return hash(frozenset(self.__args__)) (8)
L1444 return hash((self.__origin__, self.__args__)) (28)
L1814 return hash(frozenset(_value_and_type_iter(self.__args__))) (182)
L1803 return ((p, type(p)) for p in parameters) (1490)
L576 return self._getitem(self, parameters) (4)
L784 if parameters == (): (4)
L786 if not isinstance(parameters, tuple): (4)
L788 msg = "Union[arg, ...]: each arg must be a type." (4)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (16)
L185 invalid_generic_forms = (Generic, Protocol) (8)
L186 if not allow_special_forms: (8)
L187 invalid_generic_forms += (ClassVar,) (8)
L188 if is_argument: (8)
L189 invalid_generic_forms += (Final,) (8)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (8)
L166 if arg is None: (8)
L168 if isinstance(arg, str): (8)
L170 return arg (8)
L192 if (isinstance(arg, _GenericAlias) and (8)
L193 arg.__origin__ in invalid_generic_forms): (8)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (8)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (64)
L1767 return NotImplemented (64)
L197 if allow_special_forms and arg in (ClassVar, Final): (8)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (8)
L201 if type(arg) is tuple: (8)
L203 return arg (8)
L790 parameters = _remove_dups_flatten(parameters) (4)
L385 params = [] (4)
L386 for p in parameters: (12)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (8)
L388 params.extend(p.__args__) (8)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (4)
L353 try: (4)
L354 return dict.fromkeys(params) (4)
L791 if len(parameters) == 1: (4)
L793 if len(parameters) == 2 and type(None) in parameters: (4)
L795 return _UnionGenericAlias(self, parameters) (4)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1295 return attr.startswith('__') and attr.endswith('__') (236)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (296)
L1428 a for a in args) (292)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (146)
L277 if isinstance(t, type): (142)
L280 elif isinstance(t, tuple): (142)
L287 elif hasattr(t, '__typing_subst__'): (142)
L302 if _is_unpacked_typevartuple(t): (142)
L1123 return ((not isinstance(x, type)) and (284)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (142)
L304 for x in getattr(t, '__parameters__', ()): (142)
L1359 if attr in {'__name__', '__qualname__'}: (208)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (208)
L1366 raise AttributeError(attr) (208)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L245 | _DTypeLikeUInt (1)
L246 | _DTypeLikeInt (1)
L247 | _DTypeLikeFloat (1)
L248 | _DTypeLikeComplex (1)
L243 _DTypeLikeComplex_co: TypeAlias = ( (1)
_array_like.py (3)
L25 from ._nested_sequence import _NestedSequence (1)
L26 from ._shape import _Shape (1)
L28 if TYPE_CHECKING: (1)
L33 from numpy._core.multiarray import StringDType (1)
L35 _T = TypeVar("_T") (1)
L36 _ScalarType = TypeVar("_ScalarType", bound=generic) (1)
typing.py (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L197 if allow_special_forms and arg in (ClassVar, Final): (1)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (1)
L201 if type(arg) is tuple: (1)
L203 return arg (1)
L37 _ScalarType_co = TypeVar("_ScalarType_co", bound=generic, covariant=True) (1)
typing.py (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L197 if allow_special_forms and arg in (ClassVar, Final): (1)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (1)
L201 if type(arg) is tuple: (1)
L203 return arg (1)
L38 _DType = TypeVar("_DType", bound=dtype[Any]) (1)
typing.py (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L197 if allow_special_forms and arg in (ClassVar, Final): (1)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (1)
L201 if type(arg) is tuple: (1)
L203 return arg (1)
L39 _DType_co = TypeVar("_DType_co", covariant=True, bound=dtype[Any]) (1)
typing.py (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L197 if allow_special_forms and arg in (ClassVar, Final): (1)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (1)
L201 if type(arg) is tuple: (1)
L203 return arg (1)
L41 NDArray: TypeAlias = ndarray[_Shape, dtype[_ScalarType_co]] (1)
L48 @runtime_checkable (3)
typing.py (1)
L2348 if not issubclass(cls, Generic) or not getattr(cls, '_is_protocol', False): (1)
L2351 cls._is_runtime_protocol = True (1)
L2356 cls.__non_callable_proto_members__ = set() (1)
L2357 for attr in cls.__protocol_attrs__: (2)
L2358 try: (1)
L2359 is_callable = callable(getattr(cls, attr, None)) (1)
L2366 if not is_callable: (1)
L2368 return cls (1)
L49 class _SupportsArray(Protocol[_DType_co]): (2)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1226 if not args: (1)
L1230 if not all(_is_typevar_like(p) for p in args): (3)
L1128 return isinstance(x, (TypeVar, ParamSpec)) or _is_unpacked_typevartuple(x) (1)
L1234 if len(set(args)) != len(args): (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L288 if t not in parameters: (1)
L289 if enforce_default_ordering: (1)
L290 if type_var_tuple_encountered and t.has_default(): (1)
L294 if t.has_default(): (1)
L296 elif default_encountered: (1)
L300 parameters.append(t) (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L1600 if isinstance(self.__origin__, _SpecialForm): (1)
L1603 if self._name: # generic version of an ABC or built-in class (1)
L1605 if self.__origin__ is Generic: (1)
L1612 return (self.__origin__,) (1)
L50 def __array__(self) -> ndarray[Any, _DType_co]: ... (1)
typing.py (1)
L2055 if name == "Protocol" and bases == (Generic,): (1)
L2057 elif Protocol in bases: (1)
L2058 for base in bases: (2)
L2060 base in {object, Generic} (1)
L2061 or base.__name__ in _PROTO_ALLOWLIST.get(base.__module__, []) (1)
L2063 issubclass(base, Generic) (1)
L2064 and getattr(base, "_is_protocol", False) (1)
L2071 return super().__new__(mcls, name, bases, namespace, **kwargs) (1)
<frozen abc> (1)
L106 (1)
L2200 super().__init_subclass__(*args, **kwargs) (1)
L1257 super(Generic, cls).__init_subclass__(*args, **kwargs) (1)
L1258 tvars = [] (1)
L1259 if '__orig_bases__' in cls.__dict__: (1)
L1260 error = Generic in cls.__orig_bases__ (1)
L1438 if not isinstance(other, _GenericAlias): (1)
L1439 return NotImplemented (1)
L1265 if error: (1)
L1267 if '__orig_bases__' in cls.__dict__: (1)
L1268 tvars = _collect_type_parameters(cls.__orig_bases__) (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1295 return attr.startswith('__') and attr.endswith('__') (2)
L1366 raise AttributeError(attr) (2)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (2)
L305 if x not in parameters: (1)
L306 parameters.append(x) (1)
L307 return tuple(parameters) (1)
L1274 gvars = None (1)
L1275 for base in cls.__orig_bases__: (2)
L1276 if (isinstance(base, _GenericAlias) and (1)
L1277 base.__origin__ is Generic): (1)
L1282 if gvars is not None: (1)
L1291 cls.__parameters__ = tuple(tvars) (1)
L2203 if not cls.__dict__.get('_is_protocol', False): (1)
L2204 cls._is_protocol = any(b is Protocol for b in cls.__bases__) (2)
L2207 if '__subclasshook__' not in cls.__dict__: (1)
L2208 cls.__subclasshook__ = _proto_hook (1)
L2211 if cls._is_protocol and cls.__init__ is Protocol.__init__: (1)
L2212 cls.__init__ = _no_init_or_replace_init (1)
<frozen abc> (1)
L107 (1)
L108 (1)
L2074 super().__init__(*args, **kwargs) (1)
L2075 if getattr(cls, "_is_protocol", False): (1)
L2076 cls.__protocol_attrs__ = _get_protocol_attrs(cls) (1)
L1933 attrs = set() (1)
L1934 for base in cls.__mro__[:-1]: # without object (4)
L1935 if base.__name__ in {'Protocol', 'Generic'}: (3)
L1937 annotations = getattr(base, '__annotations__', {}) (1)
L1938 for attr in (*base.__dict__, *annotations): (16)
L1939 if not attr.startswith('_abc_') and attr not in EXCLUDED_ATTRIBUTES: (15)
L1940 attrs.add(attr) (1)
L1936 continue (2)
L1941 return attrs (1)
L53 @runtime_checkable (3)
typing.py (1)
L2348 if not issubclass(cls, Generic) or not getattr(cls, '_is_protocol', False): (1)
L2351 cls._is_runtime_protocol = True (1)
L2356 cls.__non_callable_proto_members__ = set() (1)
L2357 for attr in cls.__protocol_attrs__: (2)
L2358 try: (1)
L2359 is_callable = callable(getattr(cls, attr, None)) (1)
L2366 if not is_callable: (1)
L2368 return cls (1)
L54 class _SupportsArrayFunc(Protocol): (2)
L55 """A protocol class representing `~class.__array_function__`.""" (1)
L56 def __array_function__( (6)
typing.py (1)
L2055 if name == "Protocol" and bases == (Generic,): (1)
L2057 elif Protocol in bases: (1)
L2058 for base in bases: (2)
L2060 base in {object, Generic} (1)
L2061 or base.__name__ in _PROTO_ALLOWLIST.get(base.__module__, []) (1)
L2063 issubclass(base, Generic) (1)
L2064 and getattr(base, "_is_protocol", False) (1)
L2071 return super().__new__(mcls, name, bases, namespace, **kwargs) (1)
<frozen abc> (1)
L106 (1)
L2200 super().__init_subclass__(*args, **kwargs) (1)
L1257 super(Generic, cls).__init_subclass__(*args, **kwargs) (1)
L1258 tvars = [] (1)
L1259 if '__orig_bases__' in cls.__dict__: (1)
L1262 error = (Generic in cls.__bases__ and (1)
L1265 if error: (1)
L1267 if '__orig_bases__' in cls.__dict__: (1)
L1291 cls.__parameters__ = tuple(tvars) (1)
L2203 if not cls.__dict__.get('_is_protocol', False): (1)
L2204 cls._is_protocol = any(b is Protocol for b in cls.__bases__) (2)
L2207 if '__subclasshook__' not in cls.__dict__: (1)
L2208 cls.__subclasshook__ = _proto_hook (1)
L2211 if cls._is_protocol and cls.__init__ is Protocol.__init__: (1)
L2212 cls.__init__ = _no_init_or_replace_init (1)
<frozen abc> (1)
L107 (1)
L108 (1)
L2074 super().__init__(*args, **kwargs) (1)
L2075 if getattr(cls, "_is_protocol", False): (1)
L2076 cls.__protocol_attrs__ = _get_protocol_attrs(cls) (1)
L1933 attrs = set() (1)
L1934 for base in cls.__mro__[:-1]: # without object (4)
L1935 if base.__name__ in {'Protocol', 'Generic'}: (3)
L1937 annotations = getattr(base, '__annotations__', {}) (1)
L1938 for attr in (*base.__dict__, *annotations): (15)
L1939 if not attr.startswith('_abc_') and attr not in EXCLUDED_ATTRIBUTES: (14)
L1940 attrs.add(attr) (1)
L1936 continue (2)
L1941 return attrs (1)
L58 func: Callable[..., Any], (1)
L59 types: Collection[type[Any]], (1)
L60 args: tuple[Any, ...], (1)
L61 kwargs: dict[str, Any], (1)
L62 ) -> object: ... (1)
L67 _T (5)
typing.py (4)
L804 return Union[left, right] (1)
L428 try: (4)
L429 return _caches[func](*args, **kwds) (4)
L576 return self._getitem(self, parameters) (4)
L784 if parameters == (): (4)
L786 if not isinstance(parameters, tuple): (4)
L788 msg = "Union[arg, ...]: each arg must be a type." (4)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (16)
L185 invalid_generic_forms = (Generic, Protocol) (8)
L186 if not allow_special_forms: (8)
L187 invalid_generic_forms += (ClassVar,) (8)
L188 if is_argument: (8)
L189 invalid_generic_forms += (Final,) (8)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (8)
L166 if arg is None: (8)
L168 if isinstance(arg, str): (8)
L170 return arg (8)
L192 if (isinstance(arg, _GenericAlias) and (8)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (8)
L197 if allow_special_forms and arg in (ClassVar, Final): (8)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (8)
L201 if type(arg) is tuple: (8)
L203 return arg (8)
L790 parameters = _remove_dups_flatten(parameters) (4)
L385 params = [] (4)
L386 for p in parameters: (12)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (8)
L390 params.append(p) (5)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (4)
L353 try: (4)
L354 return dict.fromkeys(params) (4)
L791 if len(parameters) == 1: (4)
L793 if len(parameters) == 2 and type(None) in parameters: (4)
L795 return _UnionGenericAlias(self, parameters) (4)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1295 return attr.startswith('__') and attr.endswith('__') (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (40)
L1428 a for a in args) (36)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (18)
L277 if isinstance(t, type): (14)
L280 elif isinstance(t, tuple): (14)
L287 elif hasattr(t, '__typing_subst__'): (14)
L288 if t not in parameters: (4)
L289 if enforce_default_ordering: (4)
L300 parameters.append(t) (4)
L302 if _is_unpacked_typevartuple(t): (10)
L1123 return ((not isinstance(x, type)) and (20)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (10)
L304 for x in getattr(t, '__parameters__', ()): (20)
L305 if x not in parameters: (10)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1447 return Union[self, right] (3)
L1774 return hash(frozenset(self.__args__)) (3)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (24)
L1767 return NotImplemented (24)
L388 params.extend(p.__args__) (3)
L68 | Sequence[_T] (1)
L69 | Sequence[Sequence[_T]] (1)
L70 | Sequence[Sequence[Sequence[_T]]] (1)
L71 | Sequence[Sequence[Sequence[Sequence[_T]]]] (1)
L66 _FiniteNestedSequence: TypeAlias = ( (1)
L76 _SupportsArray[dtype[_ScalarType]] (2)
typing.py (2)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (3)
L168 if isinstance(arg, str): (3)
L170 return arg (3)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (18)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (12)
L1428 a for a in args) (10)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (5)
L277 if isinstance(t, type): (3)
L280 elif isinstance(t, tuple): (3)
L287 elif hasattr(t, '__typing_subst__'): (3)
L302 if _is_unpacked_typevartuple(t): (3)
L1123 return ((not isinstance(x, type)) and (6)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (3)
L304 for x in getattr(t, '__parameters__', ()): (6)
L305 if x not in parameters: (3)
L306 parameters.append(x) (2)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1444 return hash((self.__origin__, self.__args__)) (6)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (4)
L185 invalid_generic_forms = (Generic, Protocol) (2)
L186 if not allow_special_forms: (2)
L187 invalid_generic_forms += (ClassVar,) (2)
L188 if is_argument: (2)
L189 invalid_generic_forms += (Final,) (2)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (2)
L192 if (isinstance(arg, _GenericAlias) and (2)
L193 arg.__origin__ in invalid_generic_forms): (2)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (2)
L1438 if not isinstance(other, _GenericAlias): (18)
L1439 return NotImplemented (18)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (3)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L1359 if attr in {'__name__', '__qualname__'}: (4)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (4)
L1366 raise AttributeError(attr) (4)
L77 | _NestedSequence[_SupportsArray[dtype[_ScalarType]]] (1)
typing.py (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (9)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1366 raise AttributeError(attr) (2)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (2)
L305 if x not in parameters: (1)
L306 parameters.append(x) (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L75 _ArrayLike: TypeAlias = ( (1)
L84 _SupportsArray[_DType] (4)
typing.py (4)
L428 try: (4)
L429 return _caches[func](*args, **kwds) (4)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (7)
L168 if isinstance(arg, str): (7)
L170 return arg (7)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1295 return attr.startswith('__') and attr.endswith('__') (42)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (32)
L1428 a for a in args) (28)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (14)
L277 if isinstance(t, type): (10)
L280 elif isinstance(t, tuple): (10)
L287 elif hasattr(t, '__typing_subst__'): (10)
L288 if t not in parameters: (3)
L289 if enforce_default_ordering: (3)
L300 parameters.append(t) (3)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1447 return Union[self, right] (3)
L1444 return hash((self.__origin__, self.__args__)) (20)
L576 return self._getitem(self, parameters) (3)
L784 if parameters == (): (3)
L786 if not isinstance(parameters, tuple): (3)
L788 msg = "Union[arg, ...]: each arg must be a type." (3)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (12)
L185 invalid_generic_forms = (Generic, Protocol) (6)
L186 if not allow_special_forms: (6)
L187 invalid_generic_forms += (ClassVar,) (6)
L188 if is_argument: (6)
L189 invalid_generic_forms += (Final,) (6)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (6)
L192 if (isinstance(arg, _GenericAlias) and (6)
L193 arg.__origin__ in invalid_generic_forms): (5)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (6)
L1438 if not isinstance(other, _GenericAlias): (26)
L1439 return NotImplemented (26)
L197 if allow_special_forms and arg in (ClassVar, Final): (6)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (6)
L201 if type(arg) is tuple: (6)
L203 return arg (6)
L790 parameters = _remove_dups_flatten(parameters) (3)
L385 params = [] (3)
L386 for p in parameters: (9)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (6)
L390 params.append(p) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (3)
L353 try: (3)
L354 return dict.fromkeys(params) (3)
L791 if len(parameters) == 1: (3)
L793 if len(parameters) == 2 and type(None) in parameters: (3)
L795 return _UnionGenericAlias(self, parameters) (3)
L1359 if attr in {'__name__', '__qualname__'}: (14)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (14)
L1366 raise AttributeError(attr) (14)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (14)
L305 if x not in parameters: (7)
L306 parameters.append(x) (3)
L1774 return hash(frozenset(self.__args__)) (2)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (16)
L1767 return NotImplemented (16)
L388 params.extend(p.__args__) (2)
L85 | _NestedSequence[_SupportsArray[_DType]] (1)
typing.py (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (9)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1366 raise AttributeError(attr) (2)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (2)
L305 if x not in parameters: (1)
L306 parameters.append(x) (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L86 | _T (1)
L87 | _NestedSequence[_T] (1)
typing.py (1)
L428 try: (1)
L429 return _caches[func](*args, **kwds) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (7)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L288 if t not in parameters: (1)
L289 if enforce_default_ordering: (1)
L300 parameters.append(t) (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L83 _DualArrayLike: TypeAlias = ( (1)
L90 if sys.version_info >= (3, 12): (1)
L91 from collections.abc import Buffer as _Buffer (1)
L97 ArrayLike: TypeAlias = _Buffer | _DualArrayLike[ (2)
typing.py (1)
L428 try: (7)
L429 return _caches[func](*args, **kwds) (7)
L1774 return hash(frozenset(self.__args__)) (2)
L1444 return hash((self.__origin__, self.__args__)) (25)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (14)
L168 if isinstance(arg, str): (14)
L170 return arg (14)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (22)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (22)
L1295 return attr.startswith('__') and attr.endswith('__') (57)
L1366 raise AttributeError(attr) (22)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (9)
L186 if not allow_special_forms: (9)
L187 invalid_generic_forms += (ClassVar,) (9)
L188 if is_argument: (9)
L189 invalid_generic_forms += (Final,) (9)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (9)
L192 if (isinstance(arg, _GenericAlias) and (9)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (9)
L197 if allow_special_forms and arg in (ClassVar, Final): (9)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (9)
L201 if type(arg) is tuple: (9)
L203 return arg (9)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (32)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (16)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (5)
L1308 self._inst = inst (5)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (35)
L1370 super().__setattr__(attr, val) (35)
L1309 self._name = name (5)
L1310 self.__origin__ = origin (5)
L1311 self.__slots__ = None # This is not documented. (5)
L1425 if not isinstance(args, tuple): (5)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (59)
L1428 a for a in args) (54)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (5)
L1430 self.__parameters__ = _collect_type_parameters( (10)
L1431 args, (5)
L1432 enforce_default_ordering=enforce_default_ordering, (5)
L272 default_encountered = False (5)
L274 type_var_tuple_encountered = False (5)
L275 parameters = [] (5)
L276 for t in args: (27)
L277 if isinstance(t, type): (22)
L280 elif isinstance(t, tuple): (9)
L287 elif hasattr(t, '__typing_subst__'): (9)
L302 if _is_unpacked_typevartuple(t): (9)
L304 for x in getattr(t, '__parameters__', ()): (9)
L307 return tuple(parameters) (5)
L1434 if not name: (5)
L1435 self.__module__ = origin.__module__ (5)
L1481 return r (4)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (2)
L784 if parameters == (): (2)
L786 if not isinstance(parameters, tuple): (2)
L788 msg = "Union[arg, ...]: each arg must be a type." (2)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (10)
L193 arg.__origin__ in invalid_generic_forms): (4)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (2)
L385 params = [] (2)
L386 for p in parameters: (8)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (6)
L390 params.append(p) (4)
L388 params.extend(p.__args__) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (2)
L353 try: (2)
L354 return dict.fromkeys(params) (2)
L791 if len(parameters) == 1: (2)
L793 if len(parameters) == 2 and type(None) in parameters: (2)
L795 return _UnionGenericAlias(self, parameters) (2)
L279 pass (13)
L1450 return Union[left, self] (1)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (8)
L1767 return NotImplemented (8)
L98 dtype[Any], (2)
L99 bool | int | float | complex | str | bytes, (1)
L104 _ArrayLikeBool_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (24)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (12)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (26)
L1428 a for a in args) (22)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (11)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L279 pass (2)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L105 dtype[np.bool], (2)
L106 bool, (1)
L108 _ArrayLikeUInt_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (3)
L1472 if not self.__parameters__: (3)
L1476 if not isinstance(args, tuple): (3)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (10)
L166 if arg is None: (10)
L168 if isinstance(arg, str): (10)
L170 return arg (10)
L342 newargs = [] (3)
L343 for arg in args: (7)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (4)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (4)
L348 newargs.append(arg) (4)
L349 return newargs (3)
L1479 new_args = self._determine_new_args(args) (3)
L1498 params = self.__parameters__ (3)
L1500 for param in params: (7)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (4)
L1502 if prepare is not None: (4)
L1503 args = prepare(self, args) (4)
L1504 alen = len(args) (3)
L1505 plen = len(params) (3)
L1506 if alen != plen: (3)
L1509 new_arg_by_param = dict(zip(params, args)) (3)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (3)
L1514 new_args = [] (3)
L1515 for old_arg in args: (9)
L1516 if isinstance(old_arg, type): (6)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (6)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (37)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (6)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (2)
L1132 msg = "Parameters to generic types must be types." (2)
L1133 arg = _type_check(arg, msg, is_argument=True) (2)
L185 invalid_generic_forms = (Generic, Protocol) (6)
L186 if not allow_special_forms: (6)
L187 invalid_generic_forms += (ClassVar,) (6)
L188 if is_argument: (6)
L189 invalid_generic_forms += (Final,) (6)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (6)
L192 if (isinstance(arg, _GenericAlias) and (6)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (6)
L197 if allow_special_forms and arg in (ClassVar, Final): (6)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (6)
L201 if type(arg) is tuple: (6)
L203 return arg (6)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (2)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (2)
L1137 return arg (2)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (6)
L1548 elif _is_unpacked_typevartuple(old_arg): (6)
L1123 return ((not isinstance(x, type)) and (22)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (11)
L1559 elif isinstance(old_arg, tuple): (6)
L1571 new_args.append(new_arg) (6)
L1572 return new_args (3)
L1480 r = self.copy_with(new_args) (3)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (2)
L1424 super().__init__(origin, inst=inst, name=name) (3)
L1308 self._inst = inst (3)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (21)
L1370 super().__setattr__(attr, val) (21)
L1309 self._name = name (3)
L1310 self.__origin__ = origin (3)
L1311 self.__slots__ = None # This is not documented. (3)
L1425 if not isinstance(args, tuple): (3)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (21)
L1428 a for a in args) (18)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (3)
L1430 self.__parameters__ = _collect_type_parameters( (6)
L1431 args, (3)
L1432 enforce_default_ordering=enforce_default_ordering, (3)
L272 default_encountered = False (3)
L274 type_var_tuple_encountered = False (3)
L275 parameters = [] (3)
L276 for t in args: (9)
L277 if isinstance(t, type): (6)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L307 return tuple(parameters) (3)
L1434 if not name: (3)
L1435 self.__module__ = origin.__module__ (3)
L1481 return r (3)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L279 pass (1)
L109 dtype[np.bool] | dtype[unsignedinteger[Any]], (2)
L110 bool, (1)
L112 _ArrayLikeInt_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (26)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (13)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (28)
L1428 a for a in args) (24)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (12)
L277 if isinstance(t, type): (8)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (3)
L388 params.extend(p.__args__) (1)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L279 pass (2)
L113 dtype[np.bool] | dtype[integer[Any]], (2)
L114 bool | int, (1)
L116 _ArrayLikeFloat_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (26)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (13)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (30)
L1428 a for a in args) (26)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (13)
L277 if isinstance(t, type): (9)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (3)
L388 params.extend(p.__args__) (1)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L279 pass (3)
L117 dtype[np.bool] | dtype[integer[Any]] | dtype[floating[Any]], (2)
L118 bool | int | float, (1)
L120 _ArrayLikeComplex_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (26)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (13)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (32)
L1428 a for a in args) (28)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (14)
L277 if isinstance(t, type): (10)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (3)
L388 params.extend(p.__args__) (1)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L279 pass (4)
L122 dtype[np.bool] (4)
L123 | dtype[integer[Any]] (1)
L124 | dtype[floating[Any]] (1)
L125 | dtype[complexfloating[Any, Any]] (1)
L127 bool | int | float | complex, (1)
L121 ( (1)
L129 _ArrayLikeNumber_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (3)
L1472 if not self.__parameters__: (3)
L1476 if not isinstance(args, tuple): (3)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (10)
L166 if arg is None: (10)
L168 if isinstance(arg, str): (10)
L170 return arg (10)
L342 newargs = [] (3)
L343 for arg in args: (7)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (4)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (4)
L348 newargs.append(arg) (4)
L349 return newargs (3)
L1479 new_args = self._determine_new_args(args) (3)
L1498 params = self.__parameters__ (3)
L1500 for param in params: (7)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (4)
L1502 if prepare is not None: (4)
L1503 args = prepare(self, args) (4)
L1504 alen = len(args) (3)
L1505 plen = len(params) (3)
L1506 if alen != plen: (3)
L1509 new_arg_by_param = dict(zip(params, args)) (3)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (3)
L1514 new_args = [] (3)
L1515 for old_arg in args: (9)
L1516 if isinstance(old_arg, type): (6)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (6)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (37)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (6)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (2)
L1132 msg = "Parameters to generic types must be types." (2)
L1133 arg = _type_check(arg, msg, is_argument=True) (2)
L185 invalid_generic_forms = (Generic, Protocol) (6)
L186 if not allow_special_forms: (6)
L187 invalid_generic_forms += (ClassVar,) (6)
L188 if is_argument: (6)
L189 invalid_generic_forms += (Final,) (6)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (6)
L192 if (isinstance(arg, _GenericAlias) and (6)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (6)
L197 if allow_special_forms and arg in (ClassVar, Final): (6)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (6)
L201 if type(arg) is tuple: (6)
L203 return arg (6)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (2)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (2)
L1137 return arg (2)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (6)
L1548 elif _is_unpacked_typevartuple(old_arg): (6)
L1123 return ((not isinstance(x, type)) and (22)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (11)
L1559 elif isinstance(old_arg, tuple): (6)
L1571 new_args.append(new_arg) (6)
L1572 return new_args (3)
L1480 r = self.copy_with(new_args) (3)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (2)
L1424 super().__init__(origin, inst=inst, name=name) (3)
L1308 self._inst = inst (3)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (21)
L1370 super().__setattr__(attr, val) (21)
L1309 self._name = name (3)
L1310 self.__origin__ = origin (3)
L1311 self.__slots__ = None # This is not documented. (3)
L1425 if not isinstance(args, tuple): (3)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (27)
L1428 a for a in args) (24)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (3)
L1430 self.__parameters__ = _collect_type_parameters( (6)
L1431 args, (3)
L1432 enforce_default_ordering=enforce_default_ordering, (3)
L272 default_encountered = False (3)
L274 type_var_tuple_encountered = False (3)
L275 parameters = [] (3)
L276 for t in args: (12)
L277 if isinstance(t, type): (9)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L307 return tuple(parameters) (3)
L1434 if not name: (3)
L1435 self.__module__ = origin.__module__ (3)
L1481 return r (3)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (3)
L388 params.extend(p.__args__) (1)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L279 pass (4)
L130 dtype[np.bool] | dtype[number[Any]], (2)
L131 bool | int | float | complex, (1)
L133 _ArrayLikeTD64_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (3)
L1472 if not self.__parameters__: (3)
L1476 if not isinstance(args, tuple): (3)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (10)
L166 if arg is None: (10)
L168 if isinstance(arg, str): (10)
L170 return arg (10)
L342 newargs = [] (3)
L343 for arg in args: (7)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (4)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (4)
L348 newargs.append(arg) (4)
L349 return newargs (3)
L1479 new_args = self._determine_new_args(args) (3)
L1498 params = self.__parameters__ (3)
L1500 for param in params: (7)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (4)
L1502 if prepare is not None: (4)
L1503 args = prepare(self, args) (4)
L1504 alen = len(args) (3)
L1505 plen = len(params) (3)
L1506 if alen != plen: (3)
L1509 new_arg_by_param = dict(zip(params, args)) (3)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (3)
L1514 new_args = [] (3)
L1515 for old_arg in args: (9)
L1516 if isinstance(old_arg, type): (6)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (6)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (37)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (6)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (2)
L1132 msg = "Parameters to generic types must be types." (2)
L1133 arg = _type_check(arg, msg, is_argument=True) (2)
L185 invalid_generic_forms = (Generic, Protocol) (6)
L186 if not allow_special_forms: (6)
L187 invalid_generic_forms += (ClassVar,) (6)
L188 if is_argument: (6)
L189 invalid_generic_forms += (Final,) (6)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (6)
L192 if (isinstance(arg, _GenericAlias) and (6)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (6)
L197 if allow_special_forms and arg in (ClassVar, Final): (6)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (6)
L201 if type(arg) is tuple: (6)
L203 return arg (6)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (2)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (2)
L1137 return arg (2)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (6)
L1548 elif _is_unpacked_typevartuple(old_arg): (6)
L1123 return ((not isinstance(x, type)) and (22)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (11)
L1559 elif isinstance(old_arg, tuple): (6)
L1571 new_args.append(new_arg) (6)
L1572 return new_args (3)
L1480 r = self.copy_with(new_args) (3)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (2)
L1424 super().__init__(origin, inst=inst, name=name) (3)
L1308 self._inst = inst (3)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (21)
L1370 super().__setattr__(attr, val) (21)
L1309 self._name = name (3)
L1310 self.__origin__ = origin (3)
L1311 self.__slots__ = None # This is not documented. (3)
L1425 if not isinstance(args, tuple): (3)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (23)
L1428 a for a in args) (20)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (3)
L1430 self.__parameters__ = _collect_type_parameters( (6)
L1431 args, (3)
L1432 enforce_default_ordering=enforce_default_ordering, (3)
L272 default_encountered = False (3)
L274 type_var_tuple_encountered = False (3)
L275 parameters = [] (3)
L276 for t in args: (10)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L307 return tuple(parameters) (3)
L1434 if not name: (3)
L1435 self.__module__ = origin.__module__ (3)
L1481 return r (3)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (3)
L388 params.extend(p.__args__) (1)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L279 pass (2)
L134 dtype[np.bool] | dtype[integer[Any]] | dtype[timedelta64], (2)
L135 bool | int, (1)
L138 _SupportsArray[dtype[datetime64]] (2)
typing.py (2)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (3)
L168 if isinstance(arg, str): (3)
L170 return arg (3)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (18)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (12)
L1428 a for a in args) (10)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (5)
L277 if isinstance(t, type): (3)
L280 elif isinstance(t, tuple): (3)
L287 elif hasattr(t, '__typing_subst__'): (3)
L302 if _is_unpacked_typevartuple(t): (3)
L1123 return ((not isinstance(x, type)) and (6)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (3)
L304 for x in getattr(t, '__parameters__', ()): (3)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1444 return hash((self.__origin__, self.__args__)) (6)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (4)
L185 invalid_generic_forms = (Generic, Protocol) (2)
L186 if not allow_special_forms: (2)
L187 invalid_generic_forms += (ClassVar,) (2)
L188 if is_argument: (2)
L189 invalid_generic_forms += (Final,) (2)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (2)
L192 if (isinstance(arg, _GenericAlias) and (2)
L193 arg.__origin__ in invalid_generic_forms): (2)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (2)
L1438 if not isinstance(other, _GenericAlias): (18)
L1439 return NotImplemented (18)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (3)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L1359 if attr in {'__name__', '__qualname__'}: (4)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (4)
L1366 raise AttributeError(attr) (4)
L139 | _NestedSequence[_SupportsArray[dtype[datetime64]]] (1)
typing.py (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (9)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1366 raise AttributeError(attr) (2)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L137 _ArrayLikeDT64_co: TypeAlias = ( (1)
L142 _SupportsArray[dtype[object_]] (2)
typing.py (2)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (3)
L168 if isinstance(arg, str): (3)
L170 return arg (3)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (18)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (12)
L1428 a for a in args) (10)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (5)
L277 if isinstance(t, type): (3)
L280 elif isinstance(t, tuple): (3)
L287 elif hasattr(t, '__typing_subst__'): (3)
L302 if _is_unpacked_typevartuple(t): (3)
L1123 return ((not isinstance(x, type)) and (6)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (3)
L304 for x in getattr(t, '__parameters__', ()): (3)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1444 return hash((self.__origin__, self.__args__)) (6)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (4)
L185 invalid_generic_forms = (Generic, Protocol) (2)
L186 if not allow_special_forms: (2)
L187 invalid_generic_forms += (ClassVar,) (2)
L188 if is_argument: (2)
L189 invalid_generic_forms += (Final,) (2)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (2)
L192 if (isinstance(arg, _GenericAlias) and (2)
L193 arg.__origin__ in invalid_generic_forms): (2)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (2)
L1438 if not isinstance(other, _GenericAlias): (18)
L1439 return NotImplemented (18)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (3)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L1359 if attr in {'__name__', '__qualname__'}: (4)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (4)
L1366 raise AttributeError(attr) (4)
L143 | _NestedSequence[_SupportsArray[dtype[object_]]] (1)
typing.py (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (9)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1366 raise AttributeError(attr) (2)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L141 _ArrayLikeObject_co: TypeAlias = ( (1)
L147 _SupportsArray[dtype[void]] (2)
typing.py (2)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (3)
L168 if isinstance(arg, str): (3)
L170 return arg (3)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (18)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (12)
L1428 a for a in args) (10)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (5)
L277 if isinstance(t, type): (3)
L280 elif isinstance(t, tuple): (3)
L287 elif hasattr(t, '__typing_subst__'): (3)
L302 if _is_unpacked_typevartuple(t): (3)
L1123 return ((not isinstance(x, type)) and (6)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (3)
L304 for x in getattr(t, '__parameters__', ()): (3)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L1447 return Union[self, right] (1)
L1444 return hash((self.__origin__, self.__args__)) (6)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (4)
L185 invalid_generic_forms = (Generic, Protocol) (2)
L186 if not allow_special_forms: (2)
L187 invalid_generic_forms += (ClassVar,) (2)
L188 if is_argument: (2)
L189 invalid_generic_forms += (Final,) (2)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (2)
L192 if (isinstance(arg, _GenericAlias) and (2)
L193 arg.__origin__ in invalid_generic_forms): (2)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (2)
L1438 if not isinstance(other, _GenericAlias): (18)
L1439 return NotImplemented (18)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (3)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (2)
L390 params.append(p) (2)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L1359 if attr in {'__name__', '__qualname__'}: (4)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (4)
L1366 raise AttributeError(attr) (4)
L148 | _NestedSequence[_SupportsArray[dtype[void]]] (1)
typing.py (1)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1444 return hash((self.__origin__, self.__args__)) (1)
L1218 if not isinstance(args, tuple): (1)
L1219 args = (args,) (1)
L1221 args = tuple(_type_convert(p) for p in args) (3)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (1)
L1224 if is_generic_or_protocol: (1)
L1239 for param in cls.__parameters__: (2)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (1)
L1241 if prepare is not None: (1)
L1242 args = prepare(cls, args) (1)
L1243 _check_generic_specialization(cls, args) (1)
L315 expected_len = len(cls.__parameters__) (1)
L316 if not expected_len: (1)
L318 actual_len = len(arguments) (1)
L319 if actual_len != expected_len: (1)
L1245 new_args = [] (1)
L1246 for param, new_arg in zip(cls.__parameters__, args): (2)
L1247 if isinstance(param, TypeVarTuple): (1)
L1250 new_args.append(new_arg) (1)
L1251 args = tuple(new_args) (1)
L1253 return _GenericAlias(cls, args) (1)
L1424 super().__init__(origin, inst=inst, name=name) (1)
L1308 self._inst = inst (1)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (7)
L1295 return attr.startswith('__') and attr.endswith('__') (9)
L1370 super().__setattr__(attr, val) (7)
L1309 self._name = name (1)
L1310 self.__origin__ = origin (1)
L1311 self.__slots__ = None # This is not documented. (1)
L1425 if not isinstance(args, tuple): (1)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (5)
L1428 a for a in args) (4)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (1)
L1430 self.__parameters__ = _collect_type_parameters( (2)
L1431 args, (1)
L1432 enforce_default_ordering=enforce_default_ordering, (1)
L272 default_encountered = False (1)
L274 type_var_tuple_encountered = False (1)
L275 parameters = [] (1)
L276 for t in args: (2)
L277 if isinstance(t, type): (1)
L280 elif isinstance(t, tuple): (1)
L287 elif hasattr(t, '__typing_subst__'): (1)
L1359 if attr in {'__name__', '__qualname__'}: (2)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (2)
L1366 raise AttributeError(attr) (2)
L302 if _is_unpacked_typevartuple(t): (1)
L1123 return ((not isinstance(x, type)) and (2)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (1)
L304 for x in getattr(t, '__parameters__', ()): (1)
L307 return tuple(parameters) (1)
L1434 if not name: (1)
L1435 self.__module__ = origin.__module__ (1)
L146 _ArrayLikeVoid_co: TypeAlias = ( (1)
L150 _ArrayLikeStr_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (24)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (12)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (26)
L1428 a for a in args) (22)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (11)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L279 pass (2)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L151 dtype[str_], (2)
L152 str, (1)
L154 _ArrayLikeBytes_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (24)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (12)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (26)
L1428 a for a in args) (22)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (11)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L279 pass (2)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L155 dtype[bytes_], (2)
L156 bytes, (1)
L158 _ArrayLikeString_co: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (3)
L1472 if not self.__parameters__: (3)
L1476 if not isinstance(args, tuple): (3)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (10)
L166 if arg is None: (10)
L168 if isinstance(arg, str): (10)
L170 return arg (10)
L342 newargs = [] (3)
L343 for arg in args: (7)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (4)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (4)
L348 newargs.append(arg) (4)
L349 return newargs (3)
L1479 new_args = self._determine_new_args(args) (3)
L1498 params = self.__parameters__ (3)
L1500 for param in params: (7)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (4)
L1502 if prepare is not None: (4)
L1503 args = prepare(self, args) (4)
L1504 alen = len(args) (3)
L1505 plen = len(params) (3)
L1506 if alen != plen: (3)
L1509 new_arg_by_param = dict(zip(params, args)) (3)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (3)
L1514 new_args = [] (3)
L1515 for old_arg in args: (9)
L1516 if isinstance(old_arg, type): (6)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (6)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (37)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (6)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (2)
L1132 msg = "Parameters to generic types must be types." (2)
L1133 arg = _type_check(arg, msg, is_argument=True) (2)
L185 invalid_generic_forms = (Generic, Protocol) (6)
L186 if not allow_special_forms: (6)
L187 invalid_generic_forms += (ClassVar,) (6)
L188 if is_argument: (6)
L189 invalid_generic_forms += (Final,) (6)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (6)
L192 if (isinstance(arg, _GenericAlias) and (6)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (6)
L197 if allow_special_forms and arg in (ClassVar, Final): (6)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (6)
L201 if type(arg) is tuple: (6)
L203 return arg (6)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (2)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (2)
L1137 return arg (2)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (6)
L1548 elif _is_unpacked_typevartuple(old_arg): (6)
L1123 return ((not isinstance(x, type)) and (20)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (10)
L1559 elif isinstance(old_arg, tuple): (6)
L1571 new_args.append(new_arg) (6)
L1572 return new_args (3)
L1480 r = self.copy_with(new_args) (3)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (2)
L1424 super().__init__(origin, inst=inst, name=name) (3)
L1308 self._inst = inst (3)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (21)
L1370 super().__setattr__(attr, val) (21)
L1309 self._name = name (3)
L1310 self.__origin__ = origin (3)
L1311 self.__slots__ = None # This is not documented. (3)
L1425 if not isinstance(args, tuple): (3)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (21)
L1428 a for a in args) (18)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (3)
L1430 self.__parameters__ = _collect_type_parameters( (6)
L1431 args, (3)
L1432 enforce_default_ordering=enforce_default_ordering, (3)
L272 default_encountered = False (3)
L274 type_var_tuple_encountered = False (3)
L275 parameters = [] (3)
L276 for t in args: (9)
L277 if isinstance(t, type): (6)
L279 pass (2)
L307 return tuple(parameters) (3)
L1434 if not name: (3)
L1435 self.__module__ = origin.__module__ (3)
L1481 return r (3)
L280 elif isinstance(t, tuple): (4)
L287 elif hasattr(t, '__typing_subst__'): (4)
L302 if _is_unpacked_typevartuple(t): (4)
L304 for x in getattr(t, '__parameters__', ()): (4)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L159 StringDType, (2)
L160 str (1)
L163 _ArrayLikeStr_co | (3)
typing.py (2)
L1447 return Union[self, right] (2)
L428 try: (2)
L429 return _caches[func](*args, **kwds) (2)
L1774 return hash(frozenset(self.__args__)) (4)
L1444 return hash((self.__origin__, self.__args__)) (40)
L576 return self._getitem(self, parameters) (2)
L784 if parameters == (): (2)
L786 if not isinstance(parameters, tuple): (2)
L788 msg = "Union[arg, ...]: each arg must be a type." (2)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (8)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L193 arg.__origin__ in invalid_generic_forms): (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L1766 if not isinstance(other, (_UnionGenericAlias, types.UnionType)): (32)
L1767 return NotImplemented (32)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L790 parameters = _remove_dups_flatten(parameters) (2)
L385 params = [] (2)
L386 for p in parameters: (6)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L388 params.extend(p.__args__) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (2)
L353 try: (2)
L354 return dict.fromkeys(params) (2)
L791 if len(parameters) == 1: (2)
L793 if len(parameters) == 2 and type(None) in parameters: (2)
L795 return _UnionGenericAlias(self, parameters) (2)
L1424 super().__init__(origin, inst=inst, name=name) (2)
L1308 self._inst = inst (2)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (14)
L1295 return attr.startswith('__') and attr.endswith('__') (42)
L1370 super().__setattr__(attr, val) (14)
L1309 self._name = name (2)
L1310 self.__origin__ = origin (2)
L1311 self.__slots__ = None # This is not documented. (2)
L1425 if not isinstance(args, tuple): (2)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (42)
L1428 a for a in args) (40)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (2)
L1430 self.__parameters__ = _collect_type_parameters( (4)
L1431 args, (2)
L1432 enforce_default_ordering=enforce_default_ordering, (2)
L272 default_encountered = False (2)
L274 type_var_tuple_encountered = False (2)
L275 parameters = [] (2)
L276 for t in args: (20)
L277 if isinstance(t, type): (18)
L280 elif isinstance(t, tuple): (14)
L287 elif hasattr(t, '__typing_subst__'): (14)
L1359 if attr in {'__name__', '__qualname__'}: (28)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (28)
L1366 raise AttributeError(attr) (28)
L302 if _is_unpacked_typevartuple(t): (14)
L1123 return ((not isinstance(x, type)) and (28)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (14)
L304 for x in getattr(t, '__parameters__', ()): (14)
L279 pass (4)
L307 return tuple(parameters) (2)
L1434 if not name: (2)
L1435 self.__module__ = origin.__module__ (2)
L164 _ArrayLikeBytes_co | (1)
L165 _ArrayLikeString_co (1)
L162 _ArrayLikeAnyString_co: TypeAlias = ( (1)
L168 __Float64_co: TypeAlias = np.floating[_64Bit] | np.float32 | np.float16 | np.integer | np.bool (1)
L169 __Complex128_co: TypeAlias = np.number[_64Bit] | np.number[_32Bit] | np.float16 | np.integer | np.bool (1)
L170 _ArrayLikeFloat64_co: TypeAlias = _DualArrayLike[dtype[__Float64_co], float | int] (1)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (26)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (13)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (28)
L1428 a for a in args) (24)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (12)
L277 if isinstance(t, type): (8)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (3)
L388 params.extend(p.__args__) (1)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L279 pass (2)
L171 _ArrayLikeComplex128_co: TypeAlias = _DualArrayLike[dtype[__Complex128_co], complex | float | int] (1)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (26)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (13)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (30)
L1428 a for a in args) (26)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (13)
L277 if isinstance(t, type): (9)
L280 elif isinstance(t, tuple): (6)
L287 elif hasattr(t, '__typing_subst__'): (6)
L302 if _is_unpacked_typevartuple(t): (6)
L304 for x in getattr(t, '__parameters__', ()): (6)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (3)
L388 params.extend(p.__args__) (1)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L279 pass (3)
L174 _ArrayLikeInt: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (7)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (7)
L201 if type(arg) is tuple: (7)
L203 return arg (7)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (24)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (12)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (26)
L1428 a for a in args) (22)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (11)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (5)
L287 elif hasattr(t, '__typing_subst__'): (5)
L302 if _is_unpacked_typevartuple(t): (5)
L304 for x in getattr(t, '__parameters__', ()): (5)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L279 pass (2)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L175 dtype[integer[Any]], (2)
L176 int, (1)
L183 if sys.version_info >= (3, 11): (1)
L184 from typing import Never as _UnknownType (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L189 _ArrayLikeUnknown: TypeAlias = _DualArrayLike[ (2)
typing.py (1)
L428 try: (6)
L429 return _caches[func](*args, **kwds) (6)
L1774 return hash(frozenset(self.__args__)) (1)
L1444 return hash((self.__origin__, self.__args__)) (17)
L1469 if self.__origin__ in (Generic, Protocol): (4)
L1472 if not self.__parameters__: (4)
L1476 if not isinstance(args, tuple): (4)
L1478 args = _unpack_args(*(_type_convert(p) for p in args)) (13)
L166 if arg is None: (12)
L168 if isinstance(arg, str): (12)
L170 return arg (12)
L342 newargs = [] (4)
L343 for arg in args: (9)
L344 subargs = getattr(arg, '__typing_unpacked_tuple_args__', None) (5)
L345 if subargs is not None and not (subargs and subargs[-1] is ...): (5)
L348 newargs.append(arg) (5)
L545 if item in {'__name__', '__qualname__'}: (10)
L548 raise AttributeError(item) (10)
L349 return newargs (4)
L1479 new_args = self._determine_new_args(args) (4)
L1498 params = self.__parameters__ (4)
L1500 for param in params: (9)
L1501 prepare = getattr(param, '__typing_prepare_subst__', None) (5)
L1502 if prepare is not None: (5)
L1503 args = prepare(self, args) (5)
L1504 alen = len(args) (4)
L1505 plen = len(params) (4)
L1506 if alen != plen: (4)
L1509 new_arg_by_param = dict(zip(params, args)) (4)
L1510 return tuple(self._make_substitution(self.__args__, new_arg_by_param)) (4)
L1514 new_args = [] (4)
L1515 for old_arg in args: (11)
L1516 if isinstance(old_arg, type): (7)
L1520 substfunc = getattr(old_arg, '__typing_subst__', None) (7)
L1359 if attr in {'__name__', '__qualname__'}: (16)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (16)
L1295 return attr.startswith('__') and attr.endswith('__') (44)
L1366 raise AttributeError(attr) (16)
L1521 if substfunc: (7)
L1524 subparams = getattr(old_arg, '__parameters__', ()) (4)
L1525 if not subparams: (4)
L1528 subargs = [] (4)
L1529 for x in subparams: (8)
L1530 if isinstance(x, TypeVarTuple): (4)
L1533 subargs.append(new_arg_by_param[x]) (4)
L1534 new_arg = old_arg[tuple(subargs)] (4)
L1522 new_arg = substfunc(new_arg_by_param[old_arg]) (3)
L1132 msg = "Parameters to generic types must be types." (3)
L1133 arg = _type_check(arg, msg, is_argument=True) (3)
L185 invalid_generic_forms = (Generic, Protocol) (7)
L186 if not allow_special_forms: (7)
L187 invalid_generic_forms += (ClassVar,) (7)
L188 if is_argument: (7)
L189 invalid_generic_forms += (Final,) (7)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (7)
L192 if (isinstance(arg, _GenericAlias) and (7)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (7)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (3)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (3)
L1137 return arg (3)
L1536 if self.__origin__ == collections.abc.Callable and isinstance(new_arg, tuple): (7)
L1548 elif _is_unpacked_typevartuple(old_arg): (7)
L1123 return ((not isinstance(x, type)) and (28)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (14)
L1559 elif isinstance(old_arg, tuple): (7)
L1571 new_args.append(new_arg) (7)
L1572 return new_args (4)
L1480 r = self.copy_with(new_args) (4)
L1575 return self.__class__(self.__origin__, args, name=self._name, inst=self._inst) (3)
L1424 super().__init__(origin, inst=inst, name=name) (4)
L1308 self._inst = inst (4)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (28)
L1370 super().__setattr__(attr, val) (28)
L1309 self._name = name (4)
L1310 self.__origin__ = origin (4)
L1311 self.__slots__ = None # This is not documented. (4)
L1425 if not isinstance(args, tuple): (4)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (26)
L1428 a for a in args) (22)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (4)
L1430 self.__parameters__ = _collect_type_parameters( (8)
L1431 args, (4)
L1432 enforce_default_ordering=enforce_default_ordering, (4)
L272 default_encountered = False (4)
L274 type_var_tuple_encountered = False (4)
L275 parameters = [] (4)
L276 for t in args: (11)
L277 if isinstance(t, type): (7)
L280 elif isinstance(t, tuple): (7)
L287 elif hasattr(t, '__typing_subst__'): (7)
L302 if _is_unpacked_typevartuple(t): (7)
L304 for x in getattr(t, '__parameters__', ()): (7)
L307 return tuple(parameters) (4)
L1434 if not name: (4)
L1435 self.__module__ = origin.__module__ (4)
L1481 return r (4)
L196 return arg (3)
L1763 return Union[params] (1)
L576 return self._getitem(self, parameters) (1)
L784 if parameters == (): (1)
L786 if not isinstance(parameters, tuple): (1)
L788 msg = "Union[arg, ...]: each arg must be a type." (1)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (6)
L193 arg.__origin__ in invalid_generic_forms): (3)
L1438 if not isinstance(other, _GenericAlias): (24)
L1439 return NotImplemented (24)
L790 parameters = _remove_dups_flatten(parameters) (1)
L385 params = [] (1)
L386 for p in parameters: (5)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (4)
L390 params.append(p) (4)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (1)
L353 try: (1)
L354 return dict.fromkeys(params) (1)
L791 if len(parameters) == 1: (1)
L793 if len(parameters) == 2 and type(None) in parameters: (1)
L795 return _UnionGenericAlias(self, parameters) (1)
L190 dtype[_UnknownType], (2)
L191 _UnknownType, (1)
L946 (100)
L947 (100)
L948 (100)
L950 (100)
L952 (100)
L1333 (100)
L1334 (85)
L1335 (100)
L1337 (85)
L1338 (85)
L1339 (85)
L1343 (100)
L421 (102)
L373 (376)
L374 (752)
dtypes.py (1)
L33 from numpy import dtypes (1)
overrides.py (1)
L11 ARRAY_FUNCTIONS = set() (1)
L14 """like : array_like, optional (1)
L13 array_function_like_doc = ( (1)
L22 def get_array_function_like_doc(public_api, docstring_template=""): (1)
L27 def finalize_array_function_like(public_api): (1)
L32 add_docstring( (2)
L33 _ArrayFunctionDispatcher, (1)
L34 """ (1)
L62 add_docstring( (2)
L63 _get_implementing_args, (1)
L64 """ (1)
L80 ArgSpec = collections.namedtuple('ArgSpec', 'args varargs keywords defaults') (1)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L385 field_names = field_names.replace(',', ' ').split() (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (6)
L400 if type(name) is not str: (5)
L402 if not name.isidentifier(): (5)
L405 if _iskeyword(name): (5)
L409 seen = set() (1)
L410 for name in field_names: (5)
L411 if name.startswith('_') and not rename: (4)
L414 if name in seen: (4)
L416 seen.add(name) (4)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (6)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (5)
L509 doc = _sys.intern(f'Alias for field number {index}') (4)
L510 class_namespace[name] = _tuplegetter(index, doc) (4)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L520 try: (1)
L521 module = _sys._getframemodulename(1) or '__main__' (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L83 def verify_matching_signatures(implementation, dispatcher): (1)
L105 def array_function_dispatch(dispatcher=None, module=None, verify=True, (2)
L106 docs_from_dispatcher=False): (1)
L174 implementation, module=None, verify=True, docs_from_dispatcher=True): (1)
L173 def array_function_from_dispatcher( (1)
umath.py (1)
L10 from . import _multiarray_umath (1)
_type_aliases.py (1)
L21 from numpy._core.multiarray import typeinfo, dtype (1)
L27 sctypeDict = {} (1)
L28 allTypes = {} (1)
L29 c_names_dict = {} (1)
L31 _abstract_type_names = { (1)
L37 for _abstract_type_name in _abstract_type_names: (11)
L38 allTypes[_abstract_type_name] = getattr(ma, _abstract_type_name) (10)
L40 for k, v in typeinfo.items(): (59)
L41 if k.startswith("NPY_") and v not in c_names_dict: (58)
L44 concrete_type = v.type (34)
L45 allTypes[k] = concrete_type (34)
L46 sctypeDict[k] = concrete_type (34)
L42 c_names_dict[k[4:]] = v (24)
L49 "double": "float64", (1)
L50 "cdouble": "complex128", (1)
L51 "single": "float32", (1)
L52 "csingle": "complex64", (1)
L53 "half": "float16", (1)
L54 "bool_": "bool", (1)
L56 "int_": "intp", (1)
L57 "uint": "uintp", (1)
L48 _aliases = { (1)
L60 for k, v in _aliases.items(): (9)
L61 sctypeDict[k] = allTypes[v] (8)
L62 allTypes[k] = allTypes[v] (8)
L67 "float": "float64", (1)
L68 "complex": "complex128", (1)
L69 "object": "object_", (1)
L70 "bytes": "bytes_", (1)
L71 "a": "bytes_", (1)
L72 "int": "int_", (1)
L73 "str": "str_", (1)
L74 "unicode": "str_", (1)
L66 _extra_aliases = { (1)
L77 for k, v in _extra_aliases.items(): (9)
L78 sctypeDict[k] = allTypes[v] (8)
L81 for is_complex, full_name in [(False, "longdouble"), (True, "clongdouble")]: (3)
L82 longdouble_type: type = allTypes[full_name] (2)
L84 bits: int = dtype(longdouble_type).itemsize * 8 (2)
L85 base_name: str = "complex" if is_complex else "float" (2)
L86 extended_prec_name: str = f"{base_name}{bits}" (2)
L87 if extended_prec_name not in allTypes: (2)
L96 sctypes = {"int": set(), "uint": set(), "float": set(), (2)
L97 "complex": set(), "others": set()} (1)
L99 for type_info in typeinfo.values(): (59)
L100 if type_info.kind in ["M", "m"]: # exclude timedelta and datetime (58)
L103 concrete_type = type_info.type (54)
L107 ("int", ma.signedinteger), ("uint", ma.unsignedinteger), (54)
L108 ("float", ma.floating), ("complex", ma.complexfloating), (54)
L109 ("others", ma.generic) (54)
L106 for type_group, abstract_type in [ (143)
L111 if issubclass(concrete_type, abstract_type): (143)
L112 sctypes[type_group].add(concrete_type) (54)
L113 break (54)
L101 continue (4)
L116 for sctype_key in sctypes.keys(): (6)
L117 sctype_list = list(sctypes[sctype_key]) (5)
L118 sctype_list.sort(key=lambda x: dtype(x).itemsize) (27)
L119 sctypes[sctype_key] = sctype_list (5)
_dtype.py (1)
L10 'u': 'uint', (1)
L11 'i': 'int', (1)
L12 'c': 'complex', (1)
L13 'f': 'float', (1)
L14 'b': 'bool', (1)
L15 'V': 'void', (1)
L16 'O': 'object', (1)
L17 'M': 'datetime', (1)
L18 'm': 'timedelta', (1)
L19 'S': 'bytes', (1)
L20 'U': 'str', (1)
L9 _kind_to_stem = { (1)
L24 def _kind_name(dtype): (1)
L34 def __str__(dtype): (1)
L45 def __repr__(dtype): (1)
L52 def _unpack_field(dtype, offset, title=None): (1)
L63 def _isunsized(dtype): (1)
L68 def _construction_repr(dtype, include_align=False, short=False): (1)
L103 def _scalar_str(dtype, short): (1)
L166 def _byte_order_str(dtype): (1)
L184 def _datetime_metadata_str(dtype): (1)
L195 def _struct_dict_str(dtype, includealignedflag): (1)
L246 def _aligned_offset(offset, alignment): (1)
L251 def _is_packed(dtype): (1)
L283 def _struct_list_str(dtype): (1)
L309 def _struct_str(dtype, include_align): (1)
L326 def _subarray_str(dtype): (1)
L334 def _name_includes_bit_suffix(dtype): (1)
L350 def _name_get(dtype): (1)
numeric.py (1)
L11 from . import multiarray (1)
shape_base.py (1)
L9 from . import overrides (1)
fromnumeric.py (1)
L9 from .._utils import set_module (1)
_methods.py (1)
L12 from numpy._core import multiarray as mu (1)
arrayprint.py (3)
L34 from . import numerictypes as _nt (1)
L41 from .numerictypes import (longlong, intc, int_, float64, complex128, (1)
L1689 if (format_options.get()['legacy'] <= 113 and (18)
L1696 if a.shape == (): (18)
L1700 return _guarded_repr_or_str(np.ndarray.__getitem__(a, ())) (18)
L552 key = id(self), get_ident() (18)
L553 if key in repr_running: (18)
L555 repr_running.add(key) (18)
L556 try: (18)
L557 return f(self, *args, **kwargs) (18)
L1680 if isinstance(v, bytes): (18)
L1682 return str(v) (18)
L559 repr_running.discard(key) (18)
getlimits.py (18)
L57 self._str_epsneg = self._float_to_str(self.epsneg) (3)
L120 return self.params['fmt'] % array(_fr0(value)[0], self.ftype) (17)
L19 if a.ndim == 0: (17)
L20 a = a.copy() (17)
L21 a.shape = (1,) (17)
L22 return a (17)
L58 self._str_xmin = self._float_to_str(self.xmin) (3)
L59 self._str_xmax = self._float_to_str(self.xmax) (3)
L60 self._str_resolution = self._float_to_str(self.resolution) (3)
L61 self._str_smallest_normal = self._float_to_str(self.xmin) (3)
L250 _register_type(float128_ma, (2)
L251 b'\x9a\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\xfb\xbf') (1)
L161 _KNOWN_TYPES[bytepat] = machar (4)
L252 _float_ma[128] = float128_ma (1)
L255 epsneg_f80 = exp2(ld(-64)) (1)
L256 tiny_f80 = exp2(ld(-16382)) (1)
L258 with numeric.errstate(all='ignore'): (2)
_ufunc_config.py (2)
L432 self._token = None (1)
L433 self._call = call (1)
L434 self._all = all (1)
L435 self._divide = divide (1)
L436 self._over = over (1)
L437 self._under = under (1)
L438 self._invalid = invalid (1)
L442 if self._token is not None: (1)
L444 if self._call is _Unspecified: (1)
L445 extobj = _make_extobj( (2)
L446 all=self._all, divide=self._divide, over=self._over, (1)
L447 under=self._under, invalid=self._invalid) (1)
L454 self._token = _extobj_contextvar.set(extobj) (1)
L457 _extobj_contextvar.reset(self._token) (1)
L259 huge_f80 = (ld(1) - epsneg_f80) / tiny_f80 * ld(4) (1)
L260 float80_ma = MachArLike(ld, (2)
L261 machep=-63, (1)
L262 negep=-64, (1)
L263 minexp=-16382, (1)
L264 maxexp=16384, (1)
L265 it=63, (1)
L266 iexp=15, (1)
L267 ibeta=2, (1)
L268 irnd=5, (1)
L269 ngrd=0, (1)
L270 eps=exp2(ld(-63)), (1)
L271 epsneg=epsneg_f80, (1)
L272 huge=huge_f80, (1)
L273 tiny=tiny_f80) (1)
L37 self.params = _MACHAR_PARAMS[ftype] (2)
L38 self.ftype = ftype (2)
L39 self.title = self.params['title'] (2)
L41 if not smallest_subnormal: (2)
L42 self._smallest_subnormal = nextafter( (2)
L43 self.ftype(0), self.ftype(1), dtype=self.ftype) (1)
L46 self.epsilon = self.eps = self._float_to_float(eps) (2)
L100 return _fr1(self._float_conv(value)) (12)
L110 return array([value], self.ftype) (14)
L27 if a.size == 1: (12)
L28 a = a.copy() (12)
L29 a.shape = () (12)
L30 return a (12)
L47 self.epsneg = self._float_to_float(epsneg) (2)
L48 self.xmax = self.huge = self._float_to_float(huge) (2)
L49 self.xmin = self._float_to_float(tiny) (2)
L50 self.smallest_normal = self.tiny = self._float_to_float(tiny) (2)
L51 self.ibeta = self.params['itype'](ibeta) (2)
L52 self.__dict__.update(kwargs) (2)
L53 self.precision = int(-log10(self.eps)) (2)
L54 self.resolution = self._float_to_float( (4)
L55 self._float_conv(10) ** (-self.precision)) (2)
L56 self._str_eps = self._float_to_str(self.eps) (2)
L275 _register_type(float80_ma, b'\xcd\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xfb\xbf') (1)
L276 _float_ma[80] = float80_ma (1)
L282 huge_dd = nextafter(ld(inf), ld(0), dtype=ld) (1)
L285 smallest_normal_dd = nan (1)
L287 smallest_subnormal_dd = ld(nextafter(0., 1.)) (1)
L288 float_dd_ma = MachArLike(ld, (2)
L289 machep=-105, (1)
L290 negep=-106, (1)
L291 minexp=-1022, (1)
L292 maxexp=1024, (1)
L293 it=105, (1)
L294 iexp=11, (1)
L295 ibeta=2, (1)
L296 irnd=5, (1)
L297 ngrd=0, (1)
L298 eps=exp2(ld(-105)), (1)
L299 epsneg=exp2(ld(-106)), (1)
L300 huge=huge_dd, (1)
L301 tiny=smallest_normal_dd, (1)
L302 smallest_subnormal=smallest_subnormal_dd) (1)
L45 self._smallest_subnormal = smallest_subnormal (1)
L304 _register_type(float_dd_ma, (2)
L305 b'\x9a\x99\x99\x99\x99\x99Y<\x9a\x99\x99\x99\x99\x99\xb9\xbf') (1)
L307 _register_type(float_dd_ma, (2)
L308 b'\x9a\x99\x99\x99\x99\x99\xb9\xbf\x9a\x99\x99\x99\x99\x99Y<') (1)
L309 _float_ma['dd'] = float_dd_ma (1)
__init__.py (1)
L313 __all__ = list( (2)
L314 __numpy_submodules__ | (18)
L315 set(_core.__all__) | (1)
L316 set(_mat.__all__) | (1)
L317 set(lib._histograms_impl.__all__) | (1)
L318 set(lib._nanfunctions_impl.__all__) | (1)
L319 set(lib._function_base_impl.__all__) | (1)
L320 set(lib._twodim_base_impl.__all__) | (1)
L321 set(lib._shape_base_impl.__all__) | (1)
L322 set(lib._type_check_impl.__all__) | (1)
L323 set(lib._arraysetops_impl.__all__) | (1)
L324 set(lib._ufunclike_impl.__all__) | (1)
L325 set(lib._arraypad_impl.__all__) | (1)
L326 set(lib._utils_impl.__all__) | (1)
L327 set(lib._stride_tricks_impl.__all__) | (1)
L328 set(lib._polynomial_impl.__all__) | (1)
L329 set(lib._npyio_impl.__all__) | (1)
L330 set(lib._index_tricks_impl.__all__) | (1)
L331 {"emath", "show_config", "__version__", "__array_namespace_info__"} (1)
L335 warnings.filterwarnings("ignore", message="numpy.dtype size changed") (4)
warnings.py (1)
L143 if action not in {"error", "ignore", "always", "default", "module", "once"}: (1)
L145 if not isinstance(message, str): (1)
L147 if not isinstance(category, type) or not issubclass(category, Warning): (1)
L149 if not isinstance(module, str): (1)
L151 if not isinstance(lineno, int): (1)
L153 if lineno < 0: (1)
L156 if message or module: (1)
L157 import re (1)
L159 if message: (1)
L160 message = re.compile(message, re.I) (1)
L289 return _compile(pattern, flags) (3)
L332 if isinstance(flags, RegexFlag): (3)
L333 flags = flags.value (3)
enum.py (3)
L200 if instance is None: (3)
L207 if self.fget is not None: (3)
L209 return self.fget(instance) (3)
L1340 return self._value_ (3)
L334 try: (3)
L336 except KeyError: (4)
warnings.py (1)
L143 if action not in {"error", "ignore", "always", "default", "module", "once"}: (1)
L145 if not isinstance(message, str): (1)
L147 if not isinstance(category, type) or not issubclass(category, Warning): (1)
L149 if not isinstance(module, str): (1)
L151 if not isinstance(lineno, int): (1)
L153 if lineno < 0: (1)
L156 if message or module: (1)
L157 import re (1)
L159 if message: (1)
L160 message = re.compile(message, re.I) (1)
L337 pass (4)
warnings.py (1)
L143 if action not in {"error", "ignore", "always", "default", "module", "once"}: (1)
L145 if not isinstance(message, str): (1)
L147 if not isinstance(category, type) or not issubclass(category, Warning): (1)
L149 if not isinstance(module, str): (1)
L151 if not isinstance(lineno, int): (1)
L153 if lineno < 0: (1)
L156 if message or module: (1)
L157 import re (1)
L159 if message: (1)
L160 message = re.compile(message, re.I) (1)
L339 key = (type(pattern), pattern, flags) (4)
L341 p = _cache.pop(key, None) (3)
L342 if p is None: (3)
L343 if isinstance(pattern, Pattern): (3)
L348 if not _compiler.isstring(pattern): (3)
_compiler.py (3)
L574 return isinstance(obj, (str, bytes)) (3)
L350 p = _compiler.compile(pattern, flags) (3)
_compiler.py (3)
L746 if isstring(p): (3)
L574 return isinstance(obj, (str, bytes)) (3)
L747 pattern = p (3)
L748 p = _parser.parse(p, flags) (3)
_parser.py (3)
L973 source = Tokenizer(str) (3)
L231 self.istext = isinstance(string, str) (3)
L232 self.string = string (3)
L233 if not self.istext: (3)
L235 self.decoded_string = string (3)
L236 self.index = 0 (3)
L237 self.next = None (3)
L238 self.__next() (3)
L240 index = self.index (77)
L241 try: (77)
L242 char = self.decoded_string[index] (77)
L246 if char == "\\": (74)
L253 self.index = index + 1 (74)
L254 self.next = char (74)
L975 if state is None: (3)
L976 state = State() (3)
L77 self.flags = 0 (3)
L78 self.groupdict = {} (3)
L79 self.groupwidths = [None] # group 0 (3)
L80 self.lookbehindgroups = None (3)
L81 self.grouprefpos = {} (3)
L977 state.flags = flags (3)
L978 state.str = str (3)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (3)
L454 items = [] (3)
L455 itemsappend = items.append (3)
L456 sourcematch = source.match (3)
L457 start = source.tell() (3)
L293 return self.index - len(self.next or '') (3)
L458 while True: (3)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (6)
L460 not nested and not items)) (3)
L513 subpattern = SubPattern(state) (3)
L113 self.state = state (3)
L114 if data is None: (3)
L115 data = [] (3)
L116 self.data = data (3)
L117 self.width = None (3)
L516 subpatternappend = subpattern.append (3)
L517 sourceget = source.get (3)
L518 sourcematch = source.match (3)
L519 _len = len (3)
L520 _ord = ord (3)
L522 while True: (77)
L524 this = source.next (77)
L525 if this is None: (77)
L527 if this in "|)": (74)
L529 sourceget() (74)
L261 this = self.next (74)
L262 self.__next() (74)
L263 return this (74)
L531 if verbose: (74)
L542 if this[0] == "\\": (74)
L546 elif this not in SPECIAL_CHARS: (74)
L547 subpatternappend((LITERAL, _ord(this))) (71)
L176 self.data.append(code) (74)
L549 elif this == "[": (3)
L638 elif this in REPEAT_CHARS: (3)
L705 elif this == ".": (3)
L706 subpatternappend((ANY, None)) (3)
L243 except IndexError: (3)
L244 self.next = None (3)
L245 return (3)
L526 break # end of pattern (3)
L885 for i in range(len(subpattern))[::-1]: (77)
L164 return len(self.data) (3)
L886 op, av = subpattern[i] (74)
L168 if isinstance(index, slice): (74)
L170 return self.data[index] (74)
L887 if op is SUBPATTERN: (74)
L892 return subpattern (3)
L461 if not sourcematch("|"): (3)
L256 if char == self.next: (3)
L259 return False (3)
L462 break (3)
L466 if len(items) == 1: (3)
L467 return items[0] (3)
L981 p.state.flags = fix_flags(str, p.state.flags) (3)
L956 if isinstance(src, str): (3)
L957 if flags & SRE_FLAG_LOCALE: (3)
L959 if not flags & SRE_FLAG_ASCII: (3)
L960 flags |= SRE_FLAG_UNICODE (3)
L968 return flags (3)
L983 if source.next is not None: (3)
L987 for g in p.state.grouprefpos: (3)
L992 if flags & SRE_FLAG_DEBUG: (3)
L995 return p (3)
L752 code = _code(p, flags) (3)
L578 flags = p.state.flags | flags (3)
L579 code = [] (3)
L582 _compile_info(code, p, flags) (3)
L518 lo, hi = pattern.getwidth() (3)
_parser.py (3)
L179 if self.width is not None: (3)
L181 lo = hi = 0 (3)
L182 for op, av in self.data: (77)
L183 if op is BRANCH: (74)
L192 elif op is ATOMIC_GROUP: (74)
L196 elif op is SUBPATTERN: (74)
L200 elif op in _REPEATCODES: (74)
L207 elif op in _UNITCODES: (74)
L208 lo = lo + 1 (74)
L209 hi = hi + 1 (74)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (3)
L227 return self.width (3)
L519 if hi > MAXCODE: (3)
L521 if lo == 0: (3)
L525 prefix = [] (3)
L526 prefix_skip = 0 (3)
L527 charset = [] # not used (3)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (3)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (3)
L441 prefix = [] (3)
L442 prefixappend = prefix.append (3)
L443 prefix_skip = None (3)
L444 iscased = _get_iscased(flags) (3)
L432 if not flags & SRE_FLAG_IGNORECASE: (6)
L434 elif flags & SRE_FLAG_UNICODE: (6)
L435 return _sre.unicode_iscased (6)
L445 for op, av in pattern.data: (3)
L446 if op is LITERAL: (3)
L447 if iscased and iscased(av): (3)
L448 break (3)
L468 return prefix, prefix_skip, False (3)
L532 if not prefix: (3)
L533 charset = _get_charset_prefix(pattern, flags) (3)
L471 while True: (3)
L472 if not pattern.data: (3)
L474 op, av = pattern.data[0] (3)
L475 if op is not SUBPATTERN: (3)
L476 break (3)
L482 iscased = _get_iscased(flags) (3)
L483 if op is LITERAL: (3)
L484 if iscased and iscased(av): (3)
L485 return None (3)
L539 emit = code.append (3)
L540 emit(INFO) (3)
L541 skip = len(code); emit(0) (3)
L543 mask = 0 (3)
L544 if prefix: (3)
L548 elif charset: (3)
L550 emit(mask) (3)
L552 if lo < MAXCODE: (3)
L553 emit(lo) (3)
L557 emit(hi) (3)
L559 if prefix: (3)
L567 elif charset: (3)
L571 code[skip] = len(code) - skip (3)
L585 _compile(code, p.data, flags) (3)
L39 emit = code.append (3)
L40 _len = len (3)
L41 LITERAL_CODES = _LITERAL_CODES (3)
L42 REPEATING_CODES = _REPEATING_CODES (3)
L43 SUCCESS_CODES = _SUCCESS_CODES (3)
L44 ASSERT_CODES = _ASSERT_CODES (3)
L45 iscased = None (3)
L46 tolower = None (3)
L47 fixes = None (3)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (3)
L49 if flags & SRE_FLAG_UNICODE: (3)
L50 iscased = _sre.unicode_iscased (3)
L51 tolower = _sre.unicode_tolower (3)
L52 fixes = _EXTRA_CASES (3)
L56 for op, av in pattern: (77)
L57 if op in LITERAL_CODES: (74)
L58 if not flags & SRE_FLAG_IGNORECASE: (71)
L61 elif flags & SRE_FLAG_LOCALE: (71)
L64 elif not iscased(av): (71)
L68 lo = tolower(av) (65)
L69 if not fixes: # ascii (65)
L72 elif lo not in fixes: (65)
L73 emit(OP_UNICODE_IGNORE[op]) (59)
L74 emit(lo) (59)
L85 elif op is IN: (3)
L98 elif op is ANY: (3)
L99 if flags & SRE_FLAG_DOTALL: (3)
L102 emit(ANY) (3)
L65 emit(op) (6)
L66 emit(av) (6)
L76 emit(IN_UNI_IGNORE) (6)
L77 skip = _len(code); emit(0) (6)
L78 if op is NOT_LITERAL: (6)
L80 for k in (lo,) + fixes[lo]: (18)
L81 emit(LITERAL) (12)
L82 emit(k) (12)
L83 emit(FAILURE) (6)
L84 code[skip] = _len(code) - skip (6)
L587 code.append(SUCCESS) (3)
L589 return code (3)
L754 if flags & SRE_FLAG_DEBUG: (3)
L759 groupindex = p.state.groupdict (3)
L760 indexgroup = [None] * p.state.groups (3)
_parser.py (3)
L84 return len(self.groupwidths) (3)
L761 for k, i in groupindex.items(): (3)
L764 return _sre.compile( (6)
L765 pattern, flags | p.state.flags, code, (3)
L766 p.state.groups-1, (3)
_parser.py (3)
L84 return len(self.groupwidths) (3)
L767 groupindex, tuple(indexgroup) (3)
L351 if flags & DEBUG: (3)
enum.py (3)
L1608 other_value = self._get_value(other) (3)
L1590 if isinstance(flag, self.__class__): (9)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (6)
L1593 return flag (6)
L1609 if other_value is NotImplemented: (3)
L1612 for flag in self, other: (9)
L1613 if self._get_value(flag) is None: (6)
L1591 return flag._value_ (3)
L1615 value = self._value_ (3)
L1616 return self.__class__(value & other_value) (3)
L722 if cls._member_map_: (3)
L724 if names is not _not_given: (3)
L726 return cls.__new__(cls, value) (3)
L1160 if type(value) is cls: (3)
L1165 try: (3)
L1166 return cls._value2member_map_[value] (3)
L353 if len(_cache) >= _MAXCACHE: (3)
L363 _cache[key] = p (3)
L365 if len(_cache2) >= _MAXCACHE2: (3)
L371 _cache2[key] = p (3)
L372 return p (3)
warnings.py (3)
L163 if module: (3)
L166 module = None (3)
L168 _add_filter(action, message, category, module, lineno, append=append) (3)
L191 if not append: (3)
L192 try: (3)
L193 filters.remove(item) (3)
L194 except ValueError: (3)
L195 pass (3)
L196 filters.insert(0, item) (3)
L200 _filters_mutated() (3)
L430 def __dir__(): (1)
L441 from numpy._pytesttester import PytestTester (1)
L442 test = PytestTester(__name__) (1)
_pytesttester.py (1)
L76 self.module_name = module_name (1)
L77 self.__module__ = module_name (1)
L443 del PytestTester (1)
L445 def _sanity_check(): (1)
L468 _sanity_check() (1)
L456 try: (1)
L457 x = ones(2, dtype=float32) (1)
numeric.py (1)
L194 if like is not None: (1)
L199 a = empty(shape, dtype, order, device=device) (1)
L200 multiarray.copyto(a, 1, casting='unsafe') (1)
multiarray.py (1)
L1145 return (dst, src, where) (1)
L201 return a (1)
L458 if not abs(x.dot(x) - float32(2.0)) < 1e-5: (1)
L469 del _sanity_check (1)
L471 def _mac_os_check(): (1)
L484 if sys.platform == "darwin": (1)
L506 del _mac_os_check (1)
L508 def hugepage_setup(): (1)
L538 _core.multiarray._set_madvise_hugepage(hugepage_setup()) (1)
L515 use_hugepage = os.environ.get("NUMPY_MADVISE_HUGEPAGE", None) (1)
<frozen _collections_abc> (1)
L810 (1)
L811 (1)
<frozen os> (1)
L713 (1)
L714 (1)
L787 (1)
L781 (1)
L783 (1)
L715 (1)
L717 (1)
L812 (1)
L813 (1)
L516 if sys.platform == "linux" and use_hugepage is None: (1)
L530 elif use_hugepage is None: (1)
L532 use_hugepage = 1 (1)
L535 return use_hugepage (1)
L539 del hugepage_setup (1)
L544 _core.multiarray._multiarray_umath._reload_guard() (1)
L547 if (os.environ.get("NPY_PROMOTION_STATE", "weak") != "weak"): (1)
<frozen _collections_abc> (1)
L810 (1)
L811 (1)
<frozen os> (1)
L713 (1)
L714 (1)
L787 (1)
L781 (1)
L783 (1)
L715 (1)
L717 (1)
L812 (1)
L813 (1)
L554 def _pyinstaller_hooks_dir(): (1)
L560 del os, sys, warnings (1)
memmap.py (1)
L4 from .._utils import set_module (1)
function_base.py (1)
L7 from . import numeric as _nx (1)
_dtype_ctypes.py (1)
L32 def _from_ctypes_array(t): (1)
L36 def _from_ctypes_structure(t): (1)
L74 def _from_ctypes_scalar(t): (1)
L86 def _from_ctypes_union(t): (1)
L103 def dtype_from_ctypes_type(t): (1)
_npyio_impl.py (1)
L17 from . import format (1)
format.py (1)
L170 from numpy.lib._utils_impl import drop_metadata (1)
_utils_impl.py (1)
L13 __all__ = [ (1)
L18 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L19 def show_runtime(): (2)
L72 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L73 def get_include(): (2)
L118 class _Deprecate: (2)
L119 """ (1)
L130 def __init__(self, old_name=None, new_name=None, message=None): (1)
L135 def __call__(self, func, *args, **kwargs): (1)
L186 def _get_indent(lines): (1)
L200 def deprecate(*args, **kwargs): (1)
L265 def deprecate_with_doc(msg): (1)
L315 def _split_line(name, arguments, width): (1)
L334 _namedict = None (1)
L335 _dictlist = None (1)
L339 def _makenamedict(module='numpy'): (1)
L359 def _info(obj, output=None): (1)
L413 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L414 def info(object=None, maxwidth=76, output=None, toplevel='numpy'): (2)
L576 def safe_eval(source): (1)
L643 def _median_nancheck(data, result, axis): (1)
L685 def _opt_info(): (1)
L715 def drop_metadata(dtype, /): (1)
_iotools.py (2)
L7 import numpy._core.numeric as nx (1)
L8 from numpy._utils import asbytes, asunicode (1)
_scimath_impl.py (2)
L18 import numpy._core.numerictypes as nt (1)
L19 from numpy._core.numeric import asarray, any (1)
L20 from numpy._core.overrides import array_function_dispatch, set_module (1)
L21 from numpy.lib._type_check_impl import isreal (1)
_type_check_impl.py (1)
L13 from numpy._core.numeric import asarray, asanyarray, isnan, zeros (1)
L14 from numpy._core import overrides, getlimits (1)
_ufunclike_impl.py (1)
L9 from numpy._core.overrides import array_function_dispatch (1)
L12 def _dispatcher(x, out=None): (1)
L16 @array_function_dispatch(_dispatcher, verify=False, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L17 def fix(x, out=None): (2)
L70 @array_function_dispatch(_dispatcher, verify=False, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L71 def isposinf(x, out=None): (2)
L140 @array_function_dispatch(_dispatcher, verify=False, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L141 def isneginf(x, out=None): (2)
_stride_tricks_impl.py (1)
L8 from numpy._core.numeric import normalize_axis_tuple (1)
L9 from numpy._core.overrides import array_function_dispatch, set_module (1)
L11 __all__ = ['broadcast_to', 'broadcast_arrays', 'broadcast_shapes'] (1)
L14 class DummyArray: (2)
L15 """Dummy object that just exists to hang __array_interface__ dictionaries (1)
L19 def __init__(self, interface, base=None): (1)
L24 def _maybe_view_as_subclass(original_array, new_array): (1)
L37 @set_module("numpy.lib.stride_tricks") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L38 def as_strided(x, shape=None, strides=None, subok=False, writeable=True): (2)
L114 def _sliding_window_view_dispatcher(x, window_shape, axis=None, *, (2)
L115 subok=None, writeable=None): (1)
L119 @array_function_dispatch( (3)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L120 _sliding_window_view_dispatcher, module="numpy.lib.stride_tricks" (1)
L122 def sliding_window_view(x, window_shape, axis=None, *, (3)
L123 subok=False, writeable=False): (1)
L340 def _broadcast_to(array, shape, subok, readonly): (1)
L363 def _broadcast_to_dispatcher(array, shape, subok=None): (1)
L367 @array_function_dispatch(_broadcast_to_dispatcher, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L368 def broadcast_to(array, shape, subok=False): (2)
L413 def _broadcast_shape(*args): (1)
L430 _size0_dtype = np.dtype([]) (1)
L433 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L434 def broadcast_shapes(*args): (2)
L477 def _broadcast_arrays_dispatcher(*args, subok=None): (1)
L481 @array_function_dispatch(_broadcast_arrays_dispatcher, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L482 def broadcast_arrays(*args, subok=False): (2)
_index_tricks_impl.py (3)
L7 from .._utils import set_module (1)
L9 from numpy._core.numeric import ScalarType, array (1)
L10 from numpy._core.numerictypes import issubdtype (1)
L12 import numpy.matrixlib as matrixlib (1)
L13 from numpy._core.multiarray import ravel_multi_index, unravel_index (1)
L14 from numpy._core import overrides, linspace (1)
defmatrix.py (1)
L9 from numpy._core.numeric import concatenate, isscalar (1)
L12 from numpy.linalg import matrix_power (1)
typing.py (18)
L1257 super(Generic, cls).__init_subclass__(*args, **kwargs) (12)
L1258 tvars = [] (12)
L1259 if '__orig_bases__' in cls.__dict__: (12)
L1262 error = (Generic in cls.__bases__ and (8)
L1263 cls.__name__ != 'Protocol' and (1)
L1265 if error: (12)
L1267 if '__orig_bases__' in cls.__dict__: (12)
L1291 cls.__parameters__ = tuple(tvars) (12)
<frozen abc> (1)
L107 (1)
L108 (1)
L2074 super().__init__(*args, **kwargs) (9)
L2075 if getattr(cls, "_is_protocol", False): (9)
L2076 cls.__protocol_attrs__ = _get_protocol_attrs(cls) (9)
L1933 attrs = set() (9)
L1934 for base in cls.__mro__[:-1]: # without object (35)
L1935 if base.__name__ in {'Protocol', 'Generic'}: (26)
L1936 continue (18)
L1941 return attrs (9)
L2215 class _AnnotatedAlias(_NotIterable, _GenericAlias, _root=True): (2)
L2216 """Runtime representation of an annotated type. (1)
L2226 def __init__(self, origin, metadata): (1)
L2233 def copy_with(self, params): (1)
L2238 def __repr__(self): (1)
L2244 def __reduce__(self): (1)
L2249 def __eq__(self, other): (1)
L2255 def __hash__(self): (1)
L2258 def __getattr__(self, attr): (1)
L2263 def __mro_entries__(self, bases): (1)
L512 if '_root' not in kwds: (1)
L2267 @_TypedCacheSpecialForm (2)
L2268 @_tp_cache(typed=True) (2)
L415 def decorator(func): (1)
L435 if func is not None: (1)
L438 return decorator (1)
L2269 def Annotated(self, *params): (2)
L421 cache = functools.lru_cache(typed=typed)(func) (1)
functools.py (1)
L530 if isinstance(maxsize, int): (1)
L532 if maxsize < 0: (1)
L544 def decorating_function(user_function): (1)
L549 return decorating_function (1)
L545 wrapper = _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo) (1)
L546 wrapper.cache_parameters = lambda : {'maxsize': maxsize, 'typed': typed} (1)
L547 return update_wrapper(wrapper, user_function) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L422 _caches[func] = cache (1)
L423 _cleanups.append(cache.cache_clear) (1)
L424 del cache (1)
L426 @functools.wraps(func) (2)
functools.py (2)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L427 def inner(*args, **kwds): (2)
L433 return inner (1)
L540 self._getitem = getitem (4)
L541 self._name = getitem.__name__ (4)
L542 self.__doc__ = getitem.__doc__ (4)
L2329 def runtime_checkable(cls): (1)
L2371 def cast(typ, val): (1)
L2382 def assert_type(val, typ, /): (1)
L2398 _allowed_types = (types.FunctionType, types.BuiltinFunctionType, (2)
L2399 types.MethodType, types.ModuleType, (1)
L2400 WrapperDescriptorType, MethodWrapperType, MethodDescriptorType) (1)
L2403 def get_type_hints(obj, globalns=None, localns=None, include_extras=False): (1)
L2503 def _strip_annotations(t): (1)
L2528 def get_origin(tp): (1)
L2558 def get_args(tp): (1)
L2584 def is_typeddict(tp): (1)
L2602 _ASSERT_NEVER_REPR_MAX_LENGTH = 100 (1)
L2605 def assert_never(arg: Never, /) -> Never: (1)
L2630 def no_type_check(arg): (1)
L2666 def no_type_check_decorator(decorator): (1)
L2683 def _overload_dummy(*args, **kwds): (1)
L2693 _overload_registry = defaultdict(functools.partial(defaultdict, dict)) (1)
L2696 def overload(func): (1)
L2737 def get_overloads(func): (1)
L2749 def clear_overloads(): (1)
L2754 def final(f): (1)
L2793 T = TypeVar('T') # Any type. (1)
L2794 KT = TypeVar('KT') # Key type. (1)
L2795 VT = TypeVar('VT') # Value type. (1)
L2796 T_co = TypeVar('T_co', covariant=True) # Any type covariant containers. (1)
L2797 V_co = TypeVar('V_co', covariant=True) # Any type covariant containers. (1)
L2798 VT_co = TypeVar('VT_co', covariant=True) # Value type covariant containers. (1)
L2799 T_contra = TypeVar('T_contra', contravariant=True) # Ditto contravariant. (1)
L2801 CT_co = TypeVar('CT_co', covariant=True, bound=type) (1)
L185 invalid_generic_forms = (Generic, Protocol) (10)
L186 if not allow_special_forms: (10)
L187 invalid_generic_forms += (ClassVar,) (10)
L188 if is_argument: (10)
L189 invalid_generic_forms += (Final,) (10)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (10)
L166 if arg is None: (13)
L168 if isinstance(arg, str): (13)
L170 return arg (13)
L192 if (isinstance(arg, _GenericAlias) and (10)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (10)
L197 if allow_special_forms and arg in (ClassVar, Final): (9)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (9)
L201 if type(arg) is tuple: (9)
L203 return arg (9)
L2806 AnyStr = TypeVar('AnyStr', bytes, str) (1)
L2810 _alias = _SpecialGenericAlias (1)
L2812 Hashable = _alias(collections.abc.Hashable, 0) # Not generic. (1)
L1624 if name is None: (36)
L1625 name = origin.__name__ (27)
L1626 super().__init__(origin, inst=inst, name=name) (36)
L1308 self._inst = inst (46)
L1369 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}: (323)
L1295 return attr.startswith('__') and attr.endswith('__') (335)
L1370 super().__setattr__(attr, val) (322)
L1309 self._name = name (46)
L1310 self.__origin__ = origin (46)
L1311 self.__slots__ = None # This is not documented. (46)
L1627 self._nparams = nparams (36)
L1628 self._defaults = defaults (36)
L1629 if origin.__module__ == 'builtins': (36)
L1632 self.__doc__ = f'A generic version of {origin.__module__}.{origin.__qualname__}.' (30)
L2813 Awaitable = _alias(collections.abc.Awaitable, 1) (1)
L2814 Coroutine = _alias(collections.abc.Coroutine, 3) (1)
L2815 AsyncIterable = _alias(collections.abc.AsyncIterable, 1) (1)
L2816 AsyncIterator = _alias(collections.abc.AsyncIterator, 1) (1)
L2817 Iterable = _alias(collections.abc.Iterable, 1) (1)
L2818 Iterator = _alias(collections.abc.Iterator, 1) (1)
L2819 Reversible = _alias(collections.abc.Reversible, 1) (1)
L2820 Sized = _alias(collections.abc.Sized, 0) # Not generic. (1)
L2821 Container = _alias(collections.abc.Container, 1) (1)
L2822 Collection = _alias(collections.abc.Collection, 1) (1)
L2823 Callable = _CallableType(collections.abc.Callable, 2) (1)
L2825 """Deprecated alias to collections.abc.Callable. (1)
L2824 Callable.__doc__ = \ (1)
L2838 AbstractSet = _alias(collections.abc.Set, 1, name='AbstractSet') (1)
L2839 MutableSet = _alias(collections.abc.MutableSet, 1) (1)
L2841 Mapping = _alias(collections.abc.Mapping, 2) (1)
L2842 MutableMapping = _alias(collections.abc.MutableMapping, 2) (1)
L2843 Sequence = _alias(collections.abc.Sequence, 1) (1)
L2844 MutableSequence = _alias(collections.abc.MutableSequence, 1) (1)
L2845 ByteString = _DeprecatedGenericAlias( (2)
L2846 collections.abc.ByteString, 0, removal_version=(3, 17) # Not generic. (1)
L1686 super().__init__(origin, nparams, inst=inst, name=name) (1)
L1687 self._removal_version = removal_version (1)
L1372 setattr(self.__origin__, attr, val) (1)
L2849 Tuple = _TupleType(tuple, -1, inst=False, name='Tuple') (1)
L1630 self.__doc__ = f'A generic version of {origin.__qualname__}.' (6)
L2851 """Deprecated alias to builtins.tuple. (1)
L2850 Tuple.__doc__ = \ (1)
L2861 List = _alias(list, 1, inst=False, name='List') (1)
L2862 Deque = _alias(collections.deque, 1, name='Deque') (1)
L2863 Set = _alias(set, 1, inst=False, name='Set') (1)
L2864 FrozenSet = _alias(frozenset, 1, inst=False, name='FrozenSet') (1)
L2865 MappingView = _alias(collections.abc.MappingView, 1) (1)
L2866 KeysView = _alias(collections.abc.KeysView, 1) (1)
L2867 ItemsView = _alias(collections.abc.ItemsView, 2) (1)
L2868 ValuesView = _alias(collections.abc.ValuesView, 1) (1)
L2869 Dict = _alias(dict, 2, inst=False, name='Dict') (1)
L2870 DefaultDict = _alias(collections.defaultdict, 2, name='DefaultDict') (1)
L2871 OrderedDict = _alias(collections.OrderedDict, 2) (1)
L2872 Counter = _alias(collections.Counter, 1) (1)
L2873 ChainMap = _alias(collections.ChainMap, 2) (1)
L2874 Generator = _alias(collections.abc.Generator, 3, defaults=(types.NoneType, types.NoneType)) (1)
L2875 AsyncGenerator = _alias(collections.abc.AsyncGenerator, 2, defaults=(types.NoneType,)) (1)
L2876 Type = _alias(type, 1, inst=False, name='Type') (1)
L2878 """Deprecated alias to builtins.type. (1)
L2877 Type.__doc__ = \ (1)
L2902 @runtime_checkable (3)
L2903 class SupportsInt(Protocol): (2)
L2904 """An ABC with one abstract method __int__.""" (1)
L2906 __slots__ = () (1)
L2908 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L2909 def __int__(self) -> int: (2)
L2055 if name == "Protocol" and bases == (Generic,): (8)
L2057 elif Protocol in bases: (8)
L2058 for base in bases: (16)
L2060 base in {object, Generic} (8)
L2061 or base.__name__ in _PROTO_ALLOWLIST.get(base.__module__, []) (8)
L2063 issubclass(base, Generic) (8)
L2064 and getattr(base, "_is_protocol", False) (8)
L2071 return super().__new__(mcls, name, bases, namespace, **kwargs) (8)
<frozen abc> (8)
L106 (8)
L2200 super().__init_subclass__(*args, **kwargs) (8)
L2203 if not cls.__dict__.get('_is_protocol', False): (8)
L2204 cls._is_protocol = any(b is Protocol for b in cls.__bases__) (16)
L2207 if '__subclasshook__' not in cls.__dict__: (8)
L2208 cls.__subclasshook__ = _proto_hook (8)
L2211 if cls._is_protocol and cls.__init__ is Protocol.__init__: (8)
L2212 cls.__init__ = _no_init_or_replace_init (8)
<frozen abc> (8)
L107 (8)
L108 (8)
L1937 annotations = getattr(base, '__annotations__', {}) (8)
L1938 for attr in (*base.__dict__, *annotations): (117)
L1939 if not attr.startswith('_abc_') and attr not in EXCLUDED_ATTRIBUTES: (109)
L1940 attrs.add(attr) (8)
L2348 if not issubclass(cls, Generic) or not getattr(cls, '_is_protocol', False): (7)
L2351 cls._is_runtime_protocol = True (7)
L2356 cls.__non_callable_proto_members__ = set() (7)
L2357 for attr in cls.__protocol_attrs__: (14)
L2358 try: (7)
L2359 is_callable = callable(getattr(cls, attr, None)) (7)
L2366 if not is_callable: (7)
L2368 return cls (7)
L2913 @runtime_checkable (3)
L2914 class SupportsFloat(Protocol): (2)
L2915 """An ABC with one abstract method __float__.""" (1)
L2917 __slots__ = () (1)
L2919 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L2920 def __float__(self) -> float: (2)
L2924 @runtime_checkable (3)
L2925 class SupportsComplex(Protocol): (2)
L2926 """An ABC with one abstract method __complex__.""" (1)
L2928 __slots__ = () (1)
L2930 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L2931 def __complex__(self) -> complex: (2)
L2935 @runtime_checkable (3)
L2936 class SupportsBytes(Protocol): (2)
L2937 """An ABC with one abstract method __bytes__.""" (1)
L2939 __slots__ = () (1)
L2941 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L2942 def __bytes__(self) -> bytes: (2)
L2946 @runtime_checkable (3)
L2947 class SupportsIndex(Protocol): (2)
L2948 """An ABC with one abstract method __index__.""" (1)
L2950 __slots__ = () (1)
L2952 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L2953 def __index__(self) -> int: (2)
L2957 @runtime_checkable (3)
L2958 class SupportsAbs[T](Protocol): (3)
L1424 super().__init__(origin, inst=inst, name=name) (10)
L1425 if not isinstance(args, tuple): (10)
L1427 self.__args__ = tuple(... if a is _TypingEllipsis else (57)
L1428 a for a in args) (47)
L1429 enforce_default_ordering = origin in (Generic, Protocol) (10)
L1430 self.__parameters__ = _collect_type_parameters( (20)
L1431 args, (10)
L1432 enforce_default_ordering=enforce_default_ordering, (10)
L272 default_encountered = False (15)
L274 type_var_tuple_encountered = False (15)
L275 parameters = [] (15)
L276 for t in args: (36)
L277 if isinstance(t, type): (21)
L280 elif isinstance(t, tuple): (11)
L287 elif hasattr(t, '__typing_subst__'): (11)
L288 if t not in parameters: (4)
L289 if enforce_default_ordering: (4)
L290 if type_var_tuple_encountered and t.has_default(): (3)
L294 if t.has_default(): (3)
L296 elif default_encountered: (3)
L300 parameters.append(t) (4)
L307 return tuple(parameters) (15)
L1434 if not name: (10)
L1435 self.__module__ = origin.__module__ (7)
L1600 if isinstance(self.__origin__, _SpecialForm): (5)
L1603 if self._name: # generic version of an ABC or built-in class (5)
L1605 if self.__origin__ is Generic: (5)
L1606 if Protocol in bases: (3)
L1607 return () (2)
L2959 """An ABC with one abstract method __abs__ that is covariant in its return type.""" (1)
L2961 __slots__ = () (1)
L2963 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L2964 def __abs__(self) -> T: (2)
L1260 error = Generic in cls.__orig_bases__ (5)
L1438 if not isinstance(other, _GenericAlias): (15)
L1439 return NotImplemented (15)
L1268 tvars = _collect_type_parameters(cls.__orig_bases__) (5)
L279 pass (10)
L1359 if attr in {'__name__', '__qualname__'}: (12)
L1364 if '__origin__' in self.__dict__ and not _is_dunder(attr): (12)
L1366 raise AttributeError(attr) (12)
L302 if _is_unpacked_typevartuple(t): (7)
L1123 return ((not isinstance(x, type)) and (14)
L1124 getattr(x, '__typing_is_unpacked_typevartuple__', False)) (7)
L304 for x in getattr(t, '__parameters__', ()): (10)
L305 if x not in parameters: (3)
L306 parameters.append(x) (3)
L1274 gvars = None (5)
L1275 for base in cls.__orig_bases__: (12)
L1276 if (isinstance(base, _GenericAlias) and (7)
L1277 base.__origin__ is Generic): (5)
L1278 if gvars is not None: (3)
L1281 gvars = base.__parameters__ (3)
L1282 if gvars is not None: (5)
L1283 tvarset = set(tvars) (3)
L1284 gvarset = set(gvars) (3)
L1285 if not tvarset <= gvarset: (3)
L1290 tvars = gvars (3)
L2968 @runtime_checkable (3)
L2969 class SupportsRound[T](Protocol): (3)
L2970 """An ABC with one abstract method __round__ that is covariant in its return type.""" (1)
L2972 __slots__ = () (1)
L2974 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L2975 def __round__(self, ndigits: int = 0) -> T: (2)
L2979 def _make_nmtuple(name, types, module, defaults = ()): (1)
L2990 _prohibited = frozenset({'__new__', '__init__', '__slots__', '__getnewargs__', (1)
L2994 _special = frozenset({'__module__', '__name__', '__annotations__'}) (1)
L2997 class NamedTupleMeta(type): (2)
L2998 def __new__(cls, typename, bases, ns): (1)
L3048 def NamedTuple(typename, fields=_sentinel, /, **kwargs): (1)
L3110 _NamedTuple = type.__new__(NamedTupleMeta, 'NamedTuple', (), {}) (1)
L3112 def _namedtuple_mro_entries(bases): (1)
L3116 NamedTuple.__mro_entries__ = _namedtuple_mro_entries (1)
L3119 def _get_typeddict_qualifiers(annotation_type): (1)
L3141 class _TypedDictMeta(type): (2)
L3142 def __new__(cls, name, bases, ns, total=True): (1)
L3231 __call__ = dict # static method (1)
L3233 def __subclasscheck__(cls, other): (1)
L3237 __instancecheck__ = __subclasscheck__ (1)
L3240 def TypedDict(typename, fields=_sentinel, /, *, total=True): (1)
L3323 _TypedDict = type.__new__(_TypedDictMeta, 'TypedDict', (), {}) (1)
L3324 TypedDict.__mro_entries__ = lambda bases: (_TypedDict,) (1)
L3327 @_SpecialForm (2)
L3328 def Required(self, parameters): (2)
L3351 @_SpecialForm (2)
L3352 def NotRequired(self, parameters): (2)
L3370 @_SpecialForm (2)
L3371 def ReadOnly(self, parameters): (2)
L3390 class NewType: (2)
L3391 """NewType creates simple unique types with almost zero runtime overhead. (1)
L3412 __call__ = _idfunc (1)
L3414 def __init__(self, name, tp): (1)
L3424 def __mro_entries__(self, bases): (1)
L3439 def __repr__(self): (1)
L3442 def __reduce__(self): (1)
L3445 def __or__(self, other): (1)
L3448 def __ror__(self, other): (1)
L3453 Text = str (1)
L3457 TYPE_CHECKING = False (1)
L3460 class IO(Generic[AnyStr]): (2)
L428 try: (10)
L429 return _caches[func](*args, **kwds) (10)
L1218 if not isinstance(args, tuple): (3)
L1219 args = (args,) (3)
L1221 args = tuple(_type_convert(p) for p in args) (9)
L1222 is_generic_or_protocol = cls in (Generic, Protocol) (3)
L1224 if is_generic_or_protocol: (3)
L1226 if not args: (1)
L1230 if not all(_is_typevar_like(p) for p in args): (3)
L1128 return isinstance(x, (TypeVar, ParamSpec)) or _is_unpacked_typevartuple(x) (1)
L1234 if len(set(args)) != len(args): (1)
L1253 return _GenericAlias(cls, args) (3)
L1608 i = bases.index(self) (1)
L1609 for b in bases[i+1:]: (1)
L1612 return (self.__origin__,) (3)
L3461 """Generic base class for TextIO and BinaryIO. (1)
L3473 __slots__ = () (1)
L3475 @property (2)
L3476 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3477 def mode(self) -> str: (2)
L3480 @property (2)
L3481 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3482 def name(self) -> str: (2)
L3485 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3486 def close(self) -> None: (2)
L3489 @property (2)
L3490 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3491 def closed(self) -> bool: (2)
L3494 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3495 def fileno(self) -> int: (2)
L3498 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3499 def flush(self) -> None: (2)
L3502 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3503 def isatty(self) -> bool: (2)
L3506 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3507 def read(self, n: int = -1) -> AnyStr: (2)
L3510 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3511 def readable(self) -> bool: (2)
L3514 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3515 def readline(self, limit: int = -1) -> AnyStr: (2)
L3518 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3519 def readlines(self, hint: int = -1) -> List[AnyStr]: (2)
L1636 if not isinstance(params, tuple): (1)
L1637 params = (params,) (1)
L1638 msg = "Parameters to generic types must be types." (1)
L1639 params = tuple(_type_check(p, msg) for p in params) (3)
L1640 if (self._defaults (1)
L1645 actual_len = len(params) (1)
L1647 if actual_len != self._nparams: (1)
L1656 return self.copy_with(params) (1)
L1659 return _GenericAlias(self.__origin__, params, (2)
L1660 name=self._name, inst=self._inst) (1)
L3522 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3523 def seek(self, offset: int, whence: int = 0) -> int: (2)
L3526 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3527 def seekable(self) -> bool: (2)
L3530 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3531 def tell(self) -> int: (2)
L3534 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3535 def truncate(self, size: int = None) -> int: (2)
L3538 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3539 def writable(self) -> bool: (2)
L3542 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3543 def write(self, s: AnyStr) -> int: (2)
L3546 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3547 def writelines(self, lines: List[AnyStr]) -> None: (2)
L3550 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3551 def __enter__(self) -> 'IO[AnyStr]': (2)
L3554 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3555 def __exit__(self, type, value, traceback) -> None: (2)
L3559 class BinaryIO(IO[bytes]): (2)
L1239 for param in cls.__parameters__: (4)
L1240 prepare = getattr(param, '__typing_prepare_subst__', None) (2)
L1241 if prepare is not None: (2)
L1242 args = prepare(cls, args) (2)
L1243 _check_generic_specialization(cls, args) (2)
L315 expected_len = len(cls.__parameters__) (2)
L316 if not expected_len: (2)
L318 actual_len = len(arguments) (2)
L319 if actual_len != expected_len: (2)
L1245 new_args = [] (2)
L1246 for param, new_arg in zip(cls.__parameters__, args): (4)
L1247 if isinstance(param, TypeVarTuple): (2)
L1250 new_args.append(new_arg) (2)
L1251 args = tuple(new_args) (2)
L3560 """Typed version of the return of open() in binary mode.""" (1)
L3562 __slots__ = () (1)
L3564 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3565 def write(self, s: Union[bytes, bytearray]) -> int: (2)
L576 return self._getitem(self, parameters) (4)
L784 if parameters == (): (3)
L786 if not isinstance(parameters, tuple): (3)
L788 msg = "Union[arg, ...]: each arg must be a type." (3)
L789 parameters = tuple(_type_check(p, msg) for p in parameters) (12)
L790 parameters = _remove_dups_flatten(parameters) (3)
L385 params = [] (3)
L386 for p in parameters: (9)
L387 if isinstance(p, (_UnionGenericAlias, types.UnionType)): (6)
L390 params.append(p) (6)
L392 return tuple(_deduplicate(params, unhashable_fallback=True)) (3)
L353 try: (3)
L354 return dict.fromkeys(params) (3)
L791 if len(parameters) == 1: (3)
L793 if len(parameters) == 2 and type(None) in parameters: (3)
L795 return _UnionGenericAlias(self, parameters) (2)
L3568 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3569 def __enter__(self) -> 'BinaryIO': (2)
L3573 class TextIO(IO[str]): (2)
L3574 """Typed version of the return of open() in text mode.""" (1)
L3576 __slots__ = () (1)
L3578 @property (2)
L3579 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3580 def buffer(self) -> BinaryIO: (2)
L3583 @property (2)
L3584 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3585 def encoding(self) -> str: (2)
L3588 @property (2)
L3589 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3590 def errors(self) -> Optional[str]: (2)
L809 arg = _type_check(parameters, f"{self} requires a single type.") (1)
L554 return 'typing.' + self._name (1)
L810 return Union[arg, type(None)] (1)
L794 return _UnionGenericAlias(self, parameters, name="Optional") (1)
L3593 @property (2)
L3594 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3595 def line_buffering(self) -> bool: (2)
L3598 @property (2)
L3599 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3600 def newlines(self) -> Any: (2)
L3603 @abstractmethod (2)
<frozen abc> (1)
L24 (1)
L25 (1)
L3604 def __enter__(self) -> 'TextIO': (2)
L3608 def reveal_type[T](obj: T, /) -> T: (2)
L3627 class _IdentityCallable(Protocol): (2)
L3628 def __call__[T](self, arg: T, /) -> T: (2)
L3634 eq_default: bool = True, (2)
L3635 order_default: bool = False, (2)
L3636 kw_only_default: bool = False, (2)
L3637 frozen_default: bool = False, (2)
L3638 field_specifiers: tuple[type[Any] | Callable[..., Any], ...] = (), (2)
L3632 def dataclass_transform( (8)
L1720 if not isinstance(params, tuple) or len(params) != 2: (1)
L1723 args, result = params (1)
L1727 if isinstance(args, list): (1)
L1730 params = (args, result) (1)
L1731 return self.__getitem_inner__(params) (1)
L1735 args, result = params (1)
L1736 msg = "Callable[args, result]: result must be a type." (1)
L1737 result = _type_check(result, msg) (1)
L196 return arg (1)
L1738 if args is Ellipsis: (1)
L1739 return self.copy_with((_TypingEllipsis, result)) (1)
L1716 return _CallableGenericAlias(self.__origin__, params, (2)
L1717 name=self._name, inst=self._inst) (1)
L1450 return Union[left, self] (1)
L1444 return hash((self.__origin__, self.__args__)) (2)
L193 arg.__origin__ in invalid_generic_forms): (1)
L3639 **kwargs: Any, (1)
L3640 ) -> _IdentityCallable: (1)
L3716 type _Func = Callable[..., Any] (1)
L3719 def override[F: _Func](method: F, /) -> F: (2)
L3754 def is_protocol(tp: type, /) -> bool: (1)
L3775 def get_protocol_members(tp: type, /) -> frozenset[str]: (1)
L3794 def __getattr__(attr): (1)
<frozen importlib._bootstrap_external> (1)
L1323 (2)
L1324 (1)
_scalars.py (1)
L8 _CharLike_co: TypeAlias = str | bytes (1)
L12 _BoolLike_co: TypeAlias = bool | np.bool (1)
L13 _UIntLike_co: TypeAlias = np.unsignedinteger[Any] | _BoolLike_co (1)
L14 _IntLike_co: TypeAlias = int | np.integer[Any] | _BoolLike_co (1)
L15 _FloatLike_co: TypeAlias = float | np.floating[Any] | _IntLike_co (1)
L17 complex (3)
L18 | np.complexfloating[Any, Any] (1)
L19 | _FloatLike_co (1)
L16 _ComplexLike_co: TypeAlias = ( (1)
L21 _TD64Like_co: TypeAlias = np.timedelta64 | _IntLike_co (1)
L23 _NumberLike_co: TypeAlias = int | float | complex | np.number[Any] | np.bool (1)
L24 _ScalarLike_co: TypeAlias = int | float | complex | str | bytes | np.generic (1)
L27 _VoidLike_co: TypeAlias = tuple[Any, ...] | np.void (1)
_dtype_like.py (1)
L13 from ._shape import _ShapeLike (1)
_array_like.py (1)
L8 from numpy import ( (1)
_function_base_impl.py (2)
L9 import numpy._core.numeric as _nx (1)
L10 from numpy._core import transpose, overrides (1)
_histograms_impl.py (1)
L10 from numpy._core import overrides (1)
_nanfunctions_impl.py (2)
L26 import numpy._core.numeric as _nx (1)
L27 from numpy.lib import _function_base_impl as fnb (1)
_shape_base_impl.py (1)
L5 from numpy._core.numeric import asarray, zeros, zeros_like, array, asanyarray (1)
L6 from numpy._core.fromnumeric import reshape, transpose (1)
L7 from numpy._core.multiarray import normalize_axis_index (1)
L8 from numpy._core._multiarray_umath import _array_converter (1)
L9 from numpy._core import overrides (1)
_arraysetops_impl.py (1)
L22 from numpy._core import overrides (1)
_polynomial_impl.py (1)
L16 from numpy._core import (isscalar, abs, finfo, atleast_1d, hstack, dot, array, (1)
_arraypad_impl.py (1)
L7 from numpy._core.overrides import array_function_dispatch (1)
L8 from numpy.lib._index_tricks_impl import ndindex (1)
L11 __all__ = ['pad'] (1)
L18 def _round_if_needed(arr, dtype): (1)
L33 def _slice_at_axis(sl, axis): (1)
L58 def _view_roi(array, original_area_slice, axis): (1)
L86 def _pad_simple(array, pad_width, fill_value=None): (1)
L129 def _set_pad_area(padded, axis, width_pair, value_pair): (1)
L154 def _get_edges(padded, axis, width_pair): (1)
L186 def _get_linear_ramps(padded, axis, width_pair, end_value_pair): (1)
L230 def _get_stats(padded, axis, width_pair, length_pair, stat_func): (1)
L297 original_period, include_edge=False): (1)
L296 def _set_reflect_both(padded, axis, width_pair, method, (1)
L393 def _set_wrap_both(padded, axis, width_pair, original_period): (1)
L470 def _as_pairs(x, ndim, as_index=False): (1)
L537 def _pad_dispatcher(array, pad_width, mode=None, **kwargs): (1)
L545 @array_function_dispatch(_pad_dispatcher, module='numpy') (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L546 def pad(array, pad_width, mode='constant', **kwargs): (2)
L375 (376)
L377 (376)
L378 (376)
L379 (376)
L380 (101)
L381 (101)
L446 (101)
L447 (101)
L451 (101)
L452 (101)
L454 (101)
__init__.py (19)
L16 def set_module(module): (2)
L34 def _rename_parameter(old_names, new_names, dep_version=None): (2)
L106 from ._expired_attrs_2_0 import __expired_attributes__ (3)
L110 from . import version (2)
L80 from .memmap import * (1)
L81 from . import function_base (1)
L9 from _ctypes import _Pointer (1)
L10 from _ctypes import CFuncPtr as _CFuncPtr (1)
L11 from _ctypes import __version__ as _ctypes_version (1)
L12 from _ctypes import RTLD_LOCAL, RTLD_GLOBAL (1)
L13 from _ctypes import ArgumentError (1)
L14 from _ctypes import SIZEOF_TIME_T (1)
L18 if __version__ != _ctypes_version: (1)
L21 if _os.name == "nt": (1)
L22 from _ctypes import FormatError (1)
L24 DEFAULT_MODE = RTLD_LOCAL (1)
L25 if _os.name == "posix" and _sys.platform == "darwin": (1)
L49 def create_string_buffer(init, size=None): (1)
L70 c_buffer = create_string_buffer (1)
L72 _c_functype_cache = {} (1)
L73 def CFUNCTYPE(restype, *argtypes, **kw): (1)
L109 if _os.name == "nt": (1)
L111 from _ctypes import FUNCFLAG_STDCALL as _FUNCFLAG_STDCALL (1)
L113 _win_functype_cache = {} (1)
L114 def WINFUNCTYPE(restype, *argtypes, **kw): (1)
L135 if WINFUNCTYPE.__doc__: (1)
L141 from _ctypes import sizeof, byref, addressof, alignment, resize (1)
L142 from _ctypes import get_errno, set_errno (1)
L143 from _ctypes import _SimpleCData (1)
L145 def _check_size(typ, typecode=None): (1)
L157 class py_object(_SimpleCData): (2)
L158 _type_ = "O" (1)
L159 def __repr__(self): (1)
L164 _check_size(py_object, "P") (1)
L148 from struct import calcsize (15)
L149 if typecode is None: (14)
L152 actual, required = sizeof(typ), calcsize(typecode) (14)
L153 if actual != required: (14)
L166 class c_short(_SimpleCData): (2)
L167 _type_ = "h" (1)
L168 _check_size(c_short) (1)
L151 typecode = typ._type_ (12)
L170 class c_ushort(_SimpleCData): (2)
L171 _type_ = "H" (1)
L172 _check_size(c_ushort) (1)
L174 class c_long(_SimpleCData): (2)
L175 _type_ = "l" (1)
L176 _check_size(c_long) (1)
L178 class c_ulong(_SimpleCData): (2)
L179 _type_ = "L" (2)
_pytesttester.py (1)
L76 self.module_name = module_name (1)
L77 self.__module__ = module_name (1)
L180 _check_size(c_ulong) (2)
L182 if _calcsize("i") == _calcsize("l"): (1)
L184 c_int = c_long (1)
L185 c_uint = c_ulong (1)
L195 class c_float(_SimpleCData): (2)
L196 _type_ = "f" (1)
L197 _check_size(c_float) (1)
L199 class c_double(_SimpleCData): (2)
L200 _type_ = "d" (1)
L201 _check_size(c_double) (1)
L203 class c_longdouble(_SimpleCData): (2)
L204 _type_ = "g" (1)
L205 if sizeof(c_longdouble) == sizeof(c_double): (1)
L206 c_longdouble = c_double (1)
L208 if _calcsize("l") == _calcsize("q"): (1)
L213 class c_longlong(_SimpleCData): (2)
L214 _type_ = "q" (1)
L215 _check_size(c_longlong) (1)
L217 class c_ulonglong(_SimpleCData): (2)
L218 _type_ = "Q" (1)
L222 _check_size(c_ulonglong) (1)
L224 class c_ubyte(_SimpleCData): (2)
L225 _type_ = "B" (1)
L226 c_ubyte.__ctype_le__ = c_ubyte.__ctype_be__ = c_ubyte (1)
L229 _check_size(c_ubyte) (1)
L231 class c_byte(_SimpleCData): (2)
L232 _type_ = "b" (1)
L233 c_byte.__ctype_le__ = c_byte.__ctype_be__ = c_byte (1)
L234 _check_size(c_byte) (1)
L236 class c_char(_SimpleCData): (2)
L237 _type_ = "c" (1)
L238 c_char.__ctype_le__ = c_char.__ctype_be__ = c_char (1)
L239 _check_size(c_char) (1)
L241 class c_char_p(_SimpleCData): (2)
L242 _type_ = "z" (1)
L243 def __repr__(self): (1)
L245 _check_size(c_char_p, "P") (1)
L247 class c_void_p(_SimpleCData): (2)
L248 _type_ = "P" (1)
L249 c_voidp = c_void_p # backwards compatibility (to a bug) (1)
L250 _check_size(c_void_p) (1)
L252 class c_bool(_SimpleCData): (2)
L253 _type_ = "?" (1)
L255 from _ctypes import POINTER, pointer, _pointer_type_cache (1)
L257 class c_wchar_p(_SimpleCData): (2)
L258 _type_ = "Z" (1)
L259 def __repr__(self): (1)
L262 class c_wchar(_SimpleCData): (2)
L263 _type_ = "u" (1)
L265 def _reset_cache(): (1)
L276 def create_unicode_buffer(init, size=None): (1)
L305 def SetPointerType(pointer, cls): (1)
L316 def ARRAY(typ, len): (1)
L322 class CDLL(object): (2)
L323 """An instance of this class represents a loaded dll/shared (1)
L336 _func_flags_ = _FUNCFLAG_CDECL (1)
L337 _func_restype_ = c_int (1)
L339 _name = '<uninitialized>' (1)
L340 _handle = 0 (1)
L341 _FuncPtr = None (1)
L343 def __init__(self, name, mode=DEFAULT_MODE, handle=None, (2)
L344 use_errno=False, (1)
L345 use_last_error=False, (1)
L346 winmode=None): (1)
L394 def __repr__(self): (1)
L400 def __getattr__(self, name): (1)
L407 def __getitem__(self, name_or_ordinal): (1)
L413 class PyDLL(CDLL): (2)
L414 """This class represents the Python library itself. It allows (1)
L418 _func_flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI (1)
L420 if _os.name == "nt": (1)
L422 class WinDLL(CDLL): (2)
L423 """This class represents a dll exporting functions using the (1)
L426 _func_flags_ = _FUNCFLAG_STDCALL (1)
L430 from _ctypes import _check_HRESULT, _SimpleCData (1)
L431 class HRESULT(_SimpleCData): (2)
L432 _type_ = "l" (1)
L442 _check_retval_ = _check_HRESULT (1)
L444 class OleDLL(CDLL): (2)
L445 """This class represents a dll exporting functions using the (1)
L450 _func_flags_ = _FUNCFLAG_STDCALL (1)
L451 _func_restype_ = HRESULT (1)
L453 class LibraryLoader(object): (2)
L454 def __init__(self, dlltype): (1)
L457 def __getattr__(self, name): (1)
L467 def __getitem__(self, name): (1)
L470 def LoadLibrary(self, name): (1)
L473 __class_getitem__ = classmethod(_types.GenericAlias) (1)
L475 cdll = LibraryLoader(CDLL) (1)
L455 self._dlltype = dlltype (4)
L476 pydll = LibraryLoader(PyDLL) (1)
L478 if _os.name == "nt": (1)
L479 pythonapi = PyDLL("python dll", None, _sys.dllhandle) (1)
L347 if name: (2)
L348 name = _os.fspath(name) (2)
L353 if name.endswith(".fwork"): (2)
L360 self._name = name (2)
L361 flags = self._func_flags_ (2)
L362 if use_errno: (2)
L364 if use_last_error: (2)
L366 if _sys.platform.startswith("aix"): (2)
L374 if _os.name == "nt": (2)
L375 if winmode is not None: (2)
L378 import nt (2)
L379 mode = nt._LOAD_LIBRARY_SEARCH_DEFAULT_DIRS (2)
L380 if '/' in name or '\\' in name: (2)
L384 class _FuncPtr(_CFuncPtr): (4)
L385 _flags_ = flags (2)
L386 _restype_ = self._func_restype_ (2)
L387 self._FuncPtr = _FuncPtr (2)
L389 if handle is None: (2)
L392 self._handle = handle (1)
L488 if _os.name == "nt": (1)
L489 windll = LibraryLoader(WinDLL) (1)
L490 oledll = LibraryLoader(OleDLL) (1)
L492 GetLastError = windll.kernel32.GetLastError (1)
L458 if name[0] == '_': (1)
L460 try: (1)
L461 dll = self._dlltype(name) (1)
L390 self._handle = _dlopen(self._name, mode) (1)
L464 setattr(self, name, dll) (1)
L465 return dll (1)
L401 if name.startswith('__') and name.endswith('__'): (1)
L403 func = self.__getitem__(name) (1)
L408 func = self._FuncPtr((name_or_ordinal, self)) (1)
L409 if not isinstance(name_or_ordinal, int): (1)
L410 func.__name__ = name_or_ordinal (1)
L411 return func (1)
L404 setattr(self, name, func) (1)
L405 return func (1)
L493 from _ctypes import get_last_error, set_last_error (1)
L495 def WinError(code=None, descr=None): (1)
L502 if sizeof(c_uint) == sizeof(c_void_p): (1)
L505 elif sizeof(c_ulong) == sizeof(c_void_p): (1)
L508 elif sizeof(c_ulonglong) == sizeof(c_void_p): (1)
L509 c_size_t = c_ulonglong (1)
L510 c_ssize_t = c_longlong (1)
L514 from _ctypes import _memmove_addr, _memset_addr, _string_at_addr, _cast_addr (1)
L517 memmove = CFUNCTYPE(c_void_p, c_void_p, c_void_p, c_size_t)(_memmove_addr) (1)
L89 flags = _FUNCFLAG_CDECL (2)
L90 if kw.pop("use_errno", False): (2)
L92 if kw.pop("use_last_error", False): (2)
L94 if kw: (2)
L97 try: (2)
L98 return _c_functype_cache[(restype, argtypes, flags)] (3)
L99 except KeyError: (2)
L100 pass (2)
L102 class CFunctionType(_CFuncPtr): (5)
L103 _argtypes_ = argtypes (2)
L104 _restype_ = restype (2)
L105 _flags_ = flags (2)
L107 return CFunctionType (2)
L520 memset = CFUNCTYPE(c_void_p, c_void_p, c_int, c_size_t)(_memset_addr) (1)
L522 def PYFUNCTYPE(restype, *argtypes): (1)
L529 _cast = PYFUNCTYPE(py_object, c_void_p, py_object, py_object)(_cast_addr) (1)
L523 class CFunctionType(_CFuncPtr): (6)
L524 _argtypes_ = argtypes (3)
L525 _restype_ = restype (3)
L526 _flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI (3)
L527 return CFunctionType (3)
L530 def cast(obj, typ): (1)
L533 _string_at = PYFUNCTYPE(py_object, c_void_p, c_int)(_string_at_addr) (1)
L534 def string_at(ptr, size=-1): (1)
L540 try: (1)
L541 from _ctypes import _wstring_at_addr (1)
L545 _wstring_at = PYFUNCTYPE(py_object, c_void_p, c_int)(_wstring_at_addr) (1)
L546 def wstring_at(ptr, size=-1): (1)
L553 if _os.name == "nt": # COM stuff (1)
L554 def DllGetClassObject(rclsid, riid, ppv): (1)
L562 def DllCanUnloadNow(): (1)
L569 from ctypes._endian import BigEndianStructure, LittleEndianStructure (1)
L570 from ctypes._endian import BigEndianUnion, LittleEndianUnion (1)
L573 c_int8 = c_byte (1)
L574 c_uint8 = c_ubyte (1)
L575 for kind in [c_short, c_int, c_long, c_longlong]: (5)
L576 if sizeof(kind) == 2: c_int16 = kind (4)
L577 elif sizeof(kind) == 4: c_int32 = kind (3)
L578 elif sizeof(kind) == 8: c_int64 = kind (1)
L579 for kind in [c_ushort, c_uint, c_ulong, c_ulonglong]: (5)
L580 if sizeof(kind) == 2: c_uint16 = kind (4)
L581 elif sizeof(kind) == 4: c_uint32 = kind (3)
L582 elif sizeof(kind) == 8: c_uint64 = kind (1)
L583 del(kind) (1)
L585 if SIZEOF_TIME_T == 8: (1)
L586 c_time_t = c_int64 (1)
L592 _reset_cache() (1)
L266 _pointer_type_cache.clear() (1)
L267 _c_functype_cache.clear() (1)
L268 if _os.name == "nt": (1)
L269 _win_functype_cache.clear() (1)
L271 POINTER(c_wchar).from_param = c_wchar_p.from_param (1)
L273 POINTER(c_char).from_param = c_char_p.from_param (1)
L274 _pointer_type_cache[None] = c_void_p (1)
L134 from . import _core (1)
L5 from ._nested_sequence import ( (1)
L8 from ._nbit_base import ( (1)
L19 from ._nbit import ( (1)
L32 from ._char_codes import ( (1)
L86 from ._scalars import ( (1)
L120 from ._array_like import ( (1)
L311 _core.getlimits._register_known_types() (1)
getlimits.py (1)
L170 f16 = ntypes.float16 (1)
L171 float16_ma = MachArLike(f16, (2)
L172 machep=-10, (1)
L173 negep=-11, (1)
L174 minexp=-14, (1)
L175 maxexp=16, (1)
L176 it=10, (1)
L177 iexp=5, (1)
L178 ibeta=2, (1)
L179 irnd=5, (1)
L180 ngrd=0, (1)
L181 eps=exp2(f16(-10)), (1)
L182 epsneg=exp2(f16(-11)), (1)
L183 huge=f16(65504), (1)
L184 tiny=f16(2 ** -14)) (1)
L37 self.params = _MACHAR_PARAMS[ftype] (4)
L38 self.ftype = ftype (4)
L39 self.title = self.params['title'] (4)
L41 if not smallest_subnormal: (4)
L42 self._smallest_subnormal = nextafter( (8)
L43 self.ftype(0), self.ftype(1), dtype=self.ftype) (4)
L46 self.epsilon = self.eps = self._float_to_float(eps) (4)
L100 return _fr1(self._float_conv(value)) (24)
L110 return array([value], self.ftype) (28)
L27 if a.size == 1: (24)
L28 a = a.copy() (24)
L29 a.shape = () (24)
L30 return a (24)
L47 self.epsneg = self._float_to_float(epsneg) (4)
L48 self.xmax = self.huge = self._float_to_float(huge) (4)
L49 self.xmin = self._float_to_float(tiny) (4)
L50 self.smallest_normal = self.tiny = self._float_to_float(tiny) (4)
L51 self.ibeta = self.params['itype'](ibeta) (4)
L52 self.__dict__.update(kwargs) (4)
L53 self.precision = int(-log10(self.eps)) (4)
L54 self.resolution = self._float_to_float( (8)
L55 self._float_conv(10) ** (-self.precision)) (4)
L56 self._str_eps = self._float_to_str(self.eps) (4)
L120 return self.params['fmt'] % array(_fr0(value)[0], self.ftype) (19)
L19 if a.ndim == 0: (19)
L20 a = a.copy() (19)
L21 a.shape = (1,) (19)
L22 return a (19)
L57 self._str_epsneg = self._float_to_str(self.epsneg) (3)
L58 self._str_xmin = self._float_to_str(self.xmin) (3)
L59 self._str_xmax = self._float_to_str(self.xmax) (3)
L60 self._str_resolution = self._float_to_str(self.resolution) (3)
L61 self._str_smallest_normal = self._float_to_str(self.xmin) (3)
L185 _register_type(float16_ma, b'f\xae') (1)
L161 _KNOWN_TYPES[bytepat] = machar (3)
L186 _float_ma[16] = float16_ma (1)
L189 f32 = ntypes.float32 (1)
L190 float32_ma = MachArLike(f32, (2)
L191 machep=-23, (1)
L192 negep=-24, (1)
L193 minexp=-126, (1)
L194 maxexp=128, (1)
L195 it=23, (1)
L196 iexp=8, (1)
L197 ibeta=2, (1)
L198 irnd=5, (1)
L199 ngrd=0, (1)
L200 eps=exp2(f32(-23)), (1)
L201 epsneg=exp2(f32(-24)), (1)
L202 huge=f32((1 - 2 ** -24) * 2**128), (1)
L203 tiny=exp2(f32(-126))) (1)
L204 _register_type(float32_ma, b'\xcd\xcc\xcc\xbd') (1)
L205 _float_ma[32] = float32_ma (1)
L208 f64 = ntypes.float64 (1)
L209 epsneg_f64 = 2.0 ** -53.0 (1)
L210 tiny_f64 = 2.0 ** -1022.0 (1)
L211 float64_ma = MachArLike(f64, (2)
L212 machep=-52, (1)
L213 negep=-53, (1)
L214 minexp=-1022, (1)
L215 maxexp=1024, (1)
L216 it=52, (1)
L217 iexp=11, (1)
L218 ibeta=2, (1)
L219 irnd=5, (1)
L220 ngrd=0, (1)
L221 eps=2.0 ** -52.0, (1)
L222 epsneg=epsneg_f64, (1)
L223 huge=(1.0 - epsneg_f64) / tiny_f64 * f64(4), (1)
L224 tiny=tiny_f64) (1)
L225 _register_type(float64_ma, b'\x9a\x99\x99\x99\x99\x99\xb9\xbf') (1)
L226 _float_ma[64] = float64_ma (1)
L229 ld = ntypes.longdouble (1)
L230 epsneg_f128 = exp2(ld(-113)) (1)
L231 tiny_f128 = exp2(ld(-16382)) (1)
L233 with numeric.errstate(all='ignore'): (2)
_ufunc_config.py (2)
L432 self._token = None (1)
L433 self._call = call (1)
L434 self._all = all (1)
L435 self._divide = divide (1)
L436 self._over = over (1)
L437 self._under = under (1)
L438 self._invalid = invalid (1)
L442 if self._token is not None: (1)
L444 if self._call is _Unspecified: (1)
L445 extobj = _make_extobj( (2)
L446 all=self._all, divide=self._divide, over=self._over, (1)
L447 under=self._under, invalid=self._invalid) (1)
L454 self._token = _extobj_contextvar.set(extobj) (1)
L457 _extobj_contextvar.reset(self._token) (1)
L234 huge_f128 = (ld(1) - epsneg_f128) / tiny_f128 * ld(4) (1)
L235 float128_ma = MachArLike(ld, (2)
L236 machep=-112, (1)
L237 negep=-113, (1)
L238 minexp=-16382, (1)
L239 maxexp=16384, (1)
L240 it=112, (1)
L241 iexp=15, (1)
L242 ibeta=2, (1)
L243 irnd=5, (1)
L244 ngrd=0, (1)
L245 eps=exp2(ld(-112)), (1)
L246 epsneg=epsneg_f128, (1)
L247 huge=huge_f128, (1)
L248 tiny=tiny_f128) (1)
overrides.py (1)
L7 from numpy._core._multiarray_umath import ( (1)
datetime.py (1)
L3 from _datetime import __doc__ (1)
L8 __all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo", (1)
contextvars.py (1)
L4 __all__ = ('Context', 'ContextVar', 'Token', 'copy_context') (1)
printoptions.py (1)
L12 __all__ = ["format_options"] (1)
L15 "edgeitems": 3, # repr N leading and trailing items of each dimension (1)
L16 "threshold": 1000, # total items > triggers array summarization (1)
L17 "floatmode": "maxprec", (1)
L18 "precision": 8, # precision of floating point representations (1)
L19 "suppress": False, # suppress printing small floating values in exp format (1)
L20 "linewidth": 75, (1)
L21 "nanstr": "nan", (1)
L22 "infstr": "inf", (1)
L23 "sign": "-", (1)
L24 "formatter": None, (1)
L27 'legacy': sys.maxsize, (1)
L28 'override_repr': None, (1)
L14 default_format_options_dict = { (1)
L31 format_options = ContextVar( (2)
L32 "format_options", default=default_format_options_dict.copy()) (1)
numerictypes.py (4)
L80 import warnings (1)
L82 from . import multiarray as ma (1)
L102 from ._type_aliases import ( (1)
L105 from ._dtype import _kind_name (1)
L109 from builtins import bool, int, float, complex, object, str, bytes # noqa: F401, UP029 (1)
L113 generic = allTypes['generic'] (1)
L115 genericTypeRank = ['bool', 'int8', 'uint8', 'int16', 'uint16', (1)
L123 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L124 def maximum_sctype(t): (2)
L186 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L187 def issctype(rep): (2)
L234 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L235 def obj2sctype(rep, default=None): (2)
L289 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L290 def issubclass_(arg1, arg2): (2)
L331 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L332 def issubsctype(arg1, arg2): (2)
L364 class _PreprocessDTypeError(Exception): (2)
L365 pass (1)
L368 def _preprocess_dtype(dtype): (1)
L381 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L382 def isdtype(dtype, kind): (2)
L471 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L472 def issubdtype(arg1, arg2): (2)
L537 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L538 def sctype2char(sctype): (2)
L590 def _scalar_type_key(typ): (1)
L596 ScalarType = [int, float, complex, bool, bytes, str, memoryview] (1)
L597 ScalarType += sorted(set(sctypeDict.values()), key=_scalar_type_key) (1)
L592 dt = dtype(typ) (24)
L593 return (dt.kind.lower(), dt.itemsize) (24)
L598 ScalarType = tuple(ScalarType) (1)
L602 for key in allTypes: (53)
L603 globals()[key] = allTypes[key] (52)
L604 __all__.append(key) (52)
L606 del key (1)
L608 typecodes = {'Character': 'c', (2)
L609 'Integer': 'bhilqnp', (1)
L610 'UnsignedInteger': 'BHILQNP', (1)
L611 'Float': 'efdg', (1)
L612 'Complex': 'FDG', (1)
L613 'AllInteger': 'bBhHiIlLqQnNpP', (1)
L614 'AllFloat': 'efdgFDG', (1)
L615 'Datetime': 'Mm', (1)
L616 'All': '?bhilqnpBHILQNPefdgFDGSUVOMm'} (1)
L620 typeDict = sctypeDict (1)
L622 def _register_types(): (1)
L629 _register_types() (1)
L623 numbers.Integral.register(integer) (1)
<frozen abc> (1)
L115 (1)
L123 (1)
L624 numbers.Complex.register(inexact) (1)
<frozen abc> (1)
L115 (1)
L123 (4)
L625 numbers.Real.register(floating) (1)
<frozen abc> (1)
L115 (1)
L123 (3)
L626 numbers.Number.register(number) (1)
<frozen abc> (1)
L115 (1)
L123 (5)
numeric.py (1)
L32 bitwise_not = invert (1)
L33 ufunc = type(sin) (1)
L34 newaxis = None (1)
L36 array_function_dispatch = functools.partial( (2)
L37 overrides.array_function_dispatch, module='numpy') (1)
L40 __all__ = [ (1)
L59 a, dtype=None, order=None, subok=None, shape=None, *, device=None (2)
L58 def _zeros_like_dispatcher( (2)
L64 @array_function_dispatch(_zeros_like_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L66 a, dtype=None, order='K', subok=True, shape=None, *, device=None (2)
L65 def zeros_like( (3)
L137 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L138 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L139 def ones(shape, dtype=None, order='C', *, device=None, like=None): (2)
L204 _ones_with_like = array_function_dispatch()(ones) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L208 a, dtype=None, order=None, subok=None, shape=None, *, device=None (2)
L207 def _ones_like_dispatcher( (2)
L213 @array_function_dispatch(_ones_like_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L215 a, dtype=None, order='K', subok=True, shape=None, *, device=None (2)
L214 def ones_like( (3)
L285 shape, fill_value, dtype=None, order=None, *, device=None, like=None (2)
L284 def _full_dispatcher( (2)
L290 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L291 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L292 def full(shape, fill_value, dtype=None, order='C', *, device=None, like=None): (2)
L357 _full_with_like = array_function_dispatch()(full) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L361 a, fill_value, dtype=None, order=None, subok=None, shape=None, (1)
L360 def _full_like_dispatcher( (2)
L362 *, device=None (1)
L367 @array_function_dispatch(_full_like_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L369 a, fill_value, dtype=None, order='K', subok=True, shape=None, (1)
L368 def full_like( (3)
L370 *, device=None (1)
L446 def _count_nonzero_dispatcher(a, axis=None, *, keepdims=None): (1)
L450 @array_function_dispatch(_count_nonzero_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L451 def count_nonzero(a, axis=None, *, keepdims=False): (2)
L520 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L521 def isfortran(a): (2)
L587 def _argwhere_dispatcher(a): (1)
L591 @array_function_dispatch(_argwhere_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L592 def argwhere(a): (2)
L642 def _flatnonzero_dispatcher(a): (1)
L646 @array_function_dispatch(_flatnonzero_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L647 def flatnonzero(a): (2)
L688 def _correlate_dispatcher(a, v, mode=None): (1)
L692 @array_function_dispatch(_correlate_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L693 def correlate(a, v, mode='valid'): (2)
L768 def _convolve_dispatcher(a, v, mode=None): (1)
L772 @array_function_dispatch(_convolve_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L773 def convolve(a, v, mode='full'): (2)
L872 def _outer_dispatcher(a, b, out=None): (1)
L876 @array_function_dispatch(_outer_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L877 def outer(a, b, out=None): (2)
L964 def _tensordot_dispatcher(a, b, axes=None): (1)
L968 @array_function_dispatch(_tensordot_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L969 def tensordot(a, b, axes=2): (2)
L1181 def _roll_dispatcher(a, shift, axis=None): (1)
L1185 @array_function_dispatch(_roll_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1186 def roll(a, shift, axis=None): (2)
L1291 def _rollaxis_dispatcher(a, axis, start=None): (1)
L1295 @array_function_dispatch(_rollaxis_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1296 def rollaxis(a, axis, start=0): (2)
L1386 @set_module("numpy.lib.array_utils") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1387 def normalize_axis_tuple(axis, ndim, argname=None, allow_duplicate=False): (2)
L1444 def _moveaxis_dispatcher(a, source, destination): (1)
L1448 @array_function_dispatch(_moveaxis_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1449 def moveaxis(a, source, destination): (2)
L1518 def _cross_dispatcher(a, b, axisa=None, axisb=None, axisc=None, axis=None): (1)
L1522 @array_function_dispatch(_cross_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1523 def cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None): (2)
L1742 little_endian = (sys.byteorder == 'little') (1)
L1745 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1746 def indices(dimensions, dtype=int, sparse=False): (2)
L1847 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L1848 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1849 def fromfunction(function, shape, *, dtype=float, like=None, **kwargs): (2)
L1920 _fromfunction_with_like = array_function_dispatch()(fromfunction) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1923 def _frombuffer(buf, dtype, shape, order): (1)
L1927 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1928 def isscalar(element): (2)
L2014 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L2015 def binary_repr(num, width=None): (2)
L2122 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L2123 def base_repr(number, base=2, padding=0): (2)
L2184 def _maketup(descr, val): (1)
L2195 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L2196 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L2197 def identity(n, dtype=None, *, like=None): (2)
L2236 _identity_with_like = array_function_dispatch()(identity) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2239 def _allclose_dispatcher(a, b, rtol=None, atol=None, equal_nan=None): (1)
L2243 @array_function_dispatch(_allclose_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2244 def allclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False): (2)
L2333 def _isclose_dispatcher(a, b, rtol=None, atol=None, equal_nan=None): (1)
L2337 @array_function_dispatch(_isclose_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2338 def isclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False): (2)
L2456 def _array_equal_dispatcher(a1, a2, equal_nan=None): (1)
L2463 type(dtype(nt.bool)), (1)
L2464 type(dtype(nt.int8)), (1)
L2465 type(dtype(nt.int16)), (1)
L2466 type(dtype(nt.int32)), (1)
L2467 type(dtype(nt.int64)), (1)
L2460 _no_nan_types = { (1)
L2471 def _dtype_cannot_hold_nan(dtype): (1)
L2475 @array_function_dispatch(_array_equal_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2476 def array_equal(a1, a2, equal_nan=False): (2)
L2561 def _array_equiv_dispatcher(a1, a2): (1)
L2565 @array_function_dispatch(_array_equiv_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2566 def array_equiv(a1, a2): (2)
L2614 def _astype_dispatcher(x, dtype, /, *, copy=None, device=None): (1)
L2618 @array_function_dispatch(_astype_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2619 def astype(x, dtype, /, *, copy=True, device=None): (2)
L2684 inf = PINF (1)
L2685 nan = NAN (1)
L2686 False_ = nt.bool(False) (1)
L2687 True_ = nt.bool(True) (1)
L2690 def extend_all(module): (1)
L2698 from .umath import * (1)
_internal.py (1)
L21 IS_PYPY = sys.implementation.name == 'pypy' (1)
L23 if sys.byteorder == 'little': (1)
L24 _nbo = '<' (1)
L28 def _makenames_list(adict, align): (1)
L58 def _usefields(adict, align): (1)
L90 def _array_descr(descriptor): (1)
L140 format_re = re.compile(r'(?P<order1>[<>|=]?)' (1)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (118)
L241 try: (118)
L242 char = self.decoded_string[index] (118)
L246 if char == "\\": (117)
L253 self.index = index + 1 (117)
L254 self.next = char (117)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (6)
L455 itemsappend = items.append (6)
L456 sourcematch = source.match (6)
L457 start = source.tell() (6)
L293 return self.index - len(self.next or '') (28)
L458 while True: (6)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (12)
L460 not nested and not items)) (6)
L513 subpattern = SubPattern(state) (6)
L113 self.state = state (16)
L114 if data is None: (16)
L115 data = [] (6)
L116 self.data = data (16)
L117 self.width = None (16)
L516 subpatternappend = subpattern.append (6)
L517 sourceget = source.get (6)
L518 sourcematch = source.match (6)
L519 _len = len (6)
L520 _ord = ord (6)
L522 while True: (32)
L524 this = source.next (32)
L525 if this is None: (32)
L527 if this in "|)": (31)
L529 sourceget() (26)
L261 this = self.next (68)
L262 self.__next() (68)
L263 return this (68)
L531 if verbose: (26)
L542 if this[0] == "\\": (26)
L546 elif this not in SPECIAL_CHARS: (24)
L549 elif this == "[": (22)
L638 elif this in REPEAT_CHARS: (15)
L705 elif this == ".": (5)
L708 elif this == "(": (5)
L709 start = source.tell() - 1 (5)
L710 capture = True (5)
L711 atomic = False (5)
L712 name = None (5)
L713 add_flags = 0 (5)
L714 del_flags = 0 (5)
L715 if sourcematch("?"): (5)
L256 if char == self.next: (70)
L257 self.__next() (21)
L258 return True (21)
L717 char = sourceget() (5)
L718 if char is None: (5)
L720 if char == "P": (5)
L722 if sourcematch("<"): (4)
L724 name = source.getuntil(">", "group name") (4)
L274 result = '' (4)
L275 while True: (28)
L276 c = self.next (28)
L277 self.__next() (28)
L278 if c is None: (28)
L283 if c == terminator: (28)
L287 result += c (24)
L284 if not result: (4)
L286 break (4)
L288 return result (4)
L725 source.checkgroupname(name, 1) (4)
L304 if not (self.istext or name.isascii()): (4)
L307 if not name.isidentifier(): (4)
L854 if capture: (5)
L855 try: (4)
L856 group = state.opengroup(name) (4)
L86 gid = self.groups (4)
L84 return len(self.groupwidths) (8)
L87 self.groupwidths.append(None) (4)
L88 if self.groups > MAXGROUPS: (4)
L90 if name is not None: (4)
L91 ogid = self.groupdict.get(name, None) (4)
L92 if ogid is not None: (4)
L95 self.groupdict[name] = gid (4)
L96 return gid (4)
L861 sub_verbose = ((verbose or (add_flags & SRE_FLAG_VERBOSE)) and (5)
L863 p = _parse_sub(source, state, sub_verbose, nested + 1) (5)
L550 here = source.tell() - 1 (7)
L552 set = [] (7)
L553 setappend = set.append (7)
L556 if source.next == '[': (7)
L562 negate = sourcematch("^") (7)
L259 return False (49)
L564 while True: (30)
L565 this = sourceget() (30)
L566 if this is None: (30)
L569 if this == "]" and set: (30)
L571 elif this[0] == "\\": (23)
L574 if set and this in '-&~|' and source.next == this: (23)
L585 code1 = LITERAL, _ord(this) (23)
L586 if sourcematch("-"): (23)
L619 if code1[0] is IN: (16)
L621 setappend(code1) (16)
L570 break (7)
L623 set = _uniq(set) (7)
L449 return list(dict.fromkeys(items)) (7)
L625 if _len(set) == 1 and set[0][0] is LITERAL: (7)
L632 if negate: (5)
L636 subpatternappend((IN, set)) (5)
L176 self.data.append(code) (16)
L640 here = source.tell() (10)
L641 if this == "?": (10)
L642 min, max = 0, 1 (5)
L681 if subpattern: (10)
L164 return len(self.data) (26)
L682 item = subpattern[-1:] (10)
L168 if isinstance(index, slice): (57)
L169 return SubPattern(self.state, self.data[index]) (10)
L685 if not item or item[0][0] is AT: (10)
L170 return self.data[index] (47)
L688 if item[0][0] in _REPEATCODES: (10)
L691 if item[0][0] is SUBPATTERN: (10)
L695 if sourcematch("?"): (10)
L698 elif sourcematch("+"): (10)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (10)
L172 self.data[index] = code (10)
L528 break # end of subpattern (5)
L885 for i in range(len(subpattern))[::-1]: (22)
L886 op, av = subpattern[i] (16)
L887 if op is SUBPATTERN: (16)
L892 return subpattern (6)
L461 if not sourcematch("|"): (6)
L462 break (6)
L466 if len(items) == 1: (6)
L467 return items[0] (6)
L864 if not source.match(")"): (5)
L867 if group is not None: (5)
L868 state.closegroup(group, p) (4)
L98 self.groupwidths[gid] = p.getwidth() (4)
L179 if self.width is not None: (14)
L181 lo = hi = 0 (14)
L182 for op, av in self.data: (35)
L183 if op is BRANCH: (21)
L192 elif op is ATOMIC_GROUP: (21)
L196 elif op is SUBPATTERN: (21)
L200 elif op in _REPEATCODES: (21)
L201 i, j = av[2].getwidth() (10)
L207 elif op in _UNITCODES: (11)
L208 lo = lo + 1 (11)
L209 hi = hi + 1 (11)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (14)
L227 return self.width (14)
L202 lo = lo + i * av[0] (10)
L203 if av[1] == MAXREPEAT and j: (10)
L206 hi = hi + j * av[1] (5)
L869 if atomic: (5)
L873 subpatternappend((SUBPATTERN, (group, add_flags, del_flags, p))) (5)
L547 subpatternappend((LITERAL, _ord(this))) (2)
L643 elif this == "*": (5)
L644 min, max = 0, MAXREPEAT (4)
L627 if negate: (2)
L630 subpatternappend(set[0]) (2)
L588 that = sourceget() (7)
L589 if that is None: (7)
L592 if that == "]": (7)
L598 if that[0] == "\\": (7)
L601 if that == '-': (7)
L608 code2 = LITERAL, _ord(that) (7)
L609 if code1[0] != LITERAL or code2[0] != LITERAL: (7)
L612 lo = code1[1] (7)
L613 hi = code2[1] (7)
L614 if hi < lo: (7)
L617 setappend((RANGE, (lo, hi))) (7)
L204 hi = MAXWIDTH (5)
L247 index += 1 (2)
L248 try: (2)
L249 char += self.decoded_string[index] (2)
L747 elif char == ":": (1)
L749 capture = False (1)
L860 group = None (1)
L543 code = _escape(source, this, state) (2)
L373 code = CATEGORIES.get(escape) (2)
L374 if code: (2)
L376 code = ESCAPES.get(escape) (2)
L377 if code: (2)
L379 try: (2)
L380 c = escape[1:2] (2)
L381 if c == "x": (2)
L387 elif c == "u" and source.istext: (2)
L393 elif c == "U" and source.istext: (2)
L401 elif c == "N" and source.istext: (2)
L413 elif c == "0": (2)
L417 elif c in DIGITS: (2)
L440 if len(escape) == 2: (2)
L441 if c in ASCIILETTERS: (2)
L443 return LITERAL, ord(escape[1]) (2)
L544 subpatternappend(code) (2)
L646 elif this == "+": (1)
L647 min, max = 1, MAXREPEAT (1)
L692 group, add_flags, del_flags, p = item[0][1] (1)
L693 if group is None and not add_flags and not del_flags: (1)
L694 item = p (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L526 break # end of pattern (1)
L888 group, add_flags, del_flags, p = av (4)
L889 if group is None and not add_flags and not del_flags: (4)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (5)
L181 lo = hi = 0 (1)
L182 for op, av in self.data: (5)
L183 if op is BRANCH: (4)
L192 elif op is ATOMIC_GROUP: (4)
L196 elif op is SUBPATTERN: (4)
L197 i, j = av[-1].getwidth() (4)
L180 return self.width (4)
L198 lo = lo + i (4)
L199 hi = hi + j (4)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (1)
L227 return self.width (1)
L519 if hi > MAXCODE: (1)
L520 hi = MAXCODE (1)
L521 if lo == 0: (1)
L522 code.extend([INFO, 4, 0, lo, hi]) (1)
L523 return (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (15)
L40 _len = len (15)
L41 LITERAL_CODES = _LITERAL_CODES (15)
L42 REPEATING_CODES = _REPEATING_CODES (15)
L43 SUCCESS_CODES = _SUCCESS_CODES (15)
L44 ASSERT_CODES = _ASSERT_CODES (15)
L45 iscased = None (15)
L46 tolower = None (15)
L47 fixes = None (15)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (15)
L56 for op, av in pattern: (40)
_parser.py (35)
L168 if isinstance(index, slice): (35)
L170 return self.data[index] (35)
L57 if op in LITERAL_CODES: (25)
L85 elif op is IN: (19)
L98 elif op is ANY: (14)
L103 elif op in REPEATING_CODES: (14)
L120 elif op is SUBPATTERN: (4)
L121 group, add_flags, del_flags, p = av (4)
L122 if group: (4)
L123 emit(MARK) (4)
L124 emit((group-1)*2) (4)
L126 _compile(code, p, _combine_flags(flags, add_flags, del_flags)) (4)
L33 if add_flags & TYPE_FLAGS: (4)
L35 return (flags | add_flags) & ~del_flags (4)
L104 if _simple(av[2]): (10)
L403 if len(p) != 1: (10)
_parser.py (10)
L164 return len(self.data) (10)
L405 op, av = p[0] (9)
_parser.py (9)
L168 if isinstance(index, slice): (9)
L170 return self.data[index] (9)
L406 if op is SUBPATTERN: (9)
L408 return op in _UNIT_CODES (9)
L105 emit(REPEATING_CODES[op][2]) (9)
L106 skip = _len(code); emit(0) (9)
L107 emit(av[0]) (9)
L108 emit(av[1]) (9)
L109 _compile(code, av[2], flags) (9)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (5)
L243 out = [] (5)
L244 tail = [] (5)
L245 charmap = bytearray(256) (5)
L246 hascased = False (5)
L247 for op, av in charset: (26)
L248 while True: (21)
L249 try: (21)
L250 if op is LITERAL: (21)
L251 if fixup: # IGNORECASE and not LOCALE (14)
L260 charmap[av] = 1 (14)
L309 break (21)
L312 runs = [] (5)
L313 q = 0 (5)
L314 while True: (15)
L315 p = charmap.find(1, q) (15)
L316 if p < 0: (15)
L318 if len(runs) >= 2: (13)
L321 q = charmap.find(0, p) (10)
L322 if q < 0: (10)
L325 runs.append((p, q)) (10)
L317 break (2)
L326 if runs is not None: (5)
L328 for p, q in runs: (6)
L329 if q - p == 1: (4)
L332 out.append((RANGE, (p, q - 1))) (2)
L330 out.append((LITERAL, p)) (2)
L333 out += tail (2)
L335 if hascased or len(out) < len(charset): (2)
L336 return out, hascased (2)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (5)
L89 elif not hascased: (5)
L90 emit(IN) (5)
L95 skip = _len(code); emit(0) (5)
L96 _compile_charset(charset, flags, code) (5)
L216 emit = code.append (5)
L217 for op, av in charset: (12)
L218 emit(op) (7)
L219 if op is NEGATE: (7)
L221 elif op is LITERAL: (7)
L223 elif op is RANGE or op is RANGE_UNI_IGNORE: (5)
L224 emit(av[0]) (2)
L225 emit(av[1]) (2)
L222 emit(av) (2)
L239 emit(FAILURE) (5)
L97 code[skip] = _len(code) - skip (5)
L110 emit(SUCCESS) (9)
L111 code[skip] = _len(code) - skip (9)
L127 if group: (4)
L128 emit(MARK) (4)
L129 emit((group-1)*2+1) (4)
L58 if not flags & SRE_FLAG_IGNORECASE: (6)
L59 emit(op) (6)
L60 emit(av) (6)
L261 elif op is RANGE: (7)
L262 r = range(av[0], av[1]+1) (7)
L263 if fixup: # IGNORECASE and not LOCALE (7)
L276 for i in r: (141)
L277 charmap[i] = 1 (134)
L319 runs = None (3)
L320 break (3)
L341 if len(charmap) == 256: (3)
L342 data = _mk_bitmap(charmap) (3)
L390 s = bits.translate(_BITS_TRANS)[::-1] (3)
L392 for i in range(len(s), 0, -_CODEBITS)] (30)
L391 return [_int(s[i - _CODEBITS: i], 2) (30)
L343 out.append((CHARSET, data)) (3)
L344 out += tail (3)
L345 return out, hascased (3)
L226 elif op is CHARSET: (3)
L227 code.extend(av) (3)
L404 return False (1)
L113 emit(REPEATING_CODES[op][0]) (1)
L114 skip = _len(code); emit(0) (1)
L115 emit(av[0]) (1)
L116 emit(av[1]) (1)
L117 _compile(code, av[2], flags) (1)
L118 code[skip] = _len(code) - skip (1)
L119 emit(REPEATING_CODES[op][1]) (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (5)
L762 indexgroup[i] = k (4)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L144 sep_re = re.compile(r'\s*,\s*') (1)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (6)
L241 try: (6)
L242 char = self.decoded_string[index] (6)
L246 if char == "\\": (5)
L247 index += 1 (2)
L248 try: (2)
L249 char += self.decoded_string[index] (2)
L253 self.index = index + 1 (5)
L254 self.next = char (5)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (1)
L455 itemsappend = items.append (1)
L456 sourcematch = source.match (1)
L457 start = source.tell() (1)
L293 return self.index - len(self.next or '') (3)
L458 while True: (1)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (2)
L460 not nested and not items)) (1)
L513 subpattern = SubPattern(state) (1)
L113 self.state = state (3)
L114 if data is None: (3)
L115 data = [] (1)
L116 self.data = data (3)
L117 self.width = None (3)
L516 subpatternappend = subpattern.append (1)
L517 sourceget = source.get (1)
L518 sourcematch = source.match (1)
L519 _len = len (1)
L520 _ord = ord (1)
L522 while True: (6)
L524 this = source.next (6)
L525 if this is None: (6)
L527 if this in "|)": (5)
L529 sourceget() (5)
L261 this = self.next (5)
L262 self.__next() (5)
L263 return this (5)
L531 if verbose: (5)
L542 if this[0] == "\\": (5)
L543 code = _escape(source, this, state) (2)
L373 code = CATEGORIES.get(escape) (2)
L374 if code: (2)
L375 return code (2)
L544 subpatternappend(code) (2)
L176 self.data.append(code) (3)
L546 elif this not in SPECIAL_CHARS: (3)
L549 elif this == "[": (2)
L638 elif this in REPEAT_CHARS: (2)
L640 here = source.tell() (2)
L641 if this == "?": (2)
L643 elif this == "*": (2)
L644 min, max = 0, MAXREPEAT (2)
L681 if subpattern: (2)
L164 return len(self.data) (5)
L682 item = subpattern[-1:] (2)
L168 if isinstance(index, slice): (11)
L169 return SubPattern(self.state, self.data[index]) (2)
L685 if not item or item[0][0] is AT: (2)
L170 return self.data[index] (9)
L688 if item[0][0] in _REPEATCODES: (2)
L691 if item[0][0] is SUBPATTERN: (2)
L695 if sourcematch("?"): (2)
L256 if char == self.next: (5)
L259 return False (5)
L698 elif sourcematch("+"): (2)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (2)
L172 self.data[index] = code (2)
L547 subpatternappend((LITERAL, _ord(this))) (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L526 break # end of pattern (1)
L885 for i in range(len(subpattern))[::-1]: (4)
L886 op, av = subpattern[i] (3)
L887 if op is SUBPATTERN: (3)
L892 return subpattern (1)
L461 if not sourcematch("|"): (1)
L462 break (1)
L466 if len(items) == 1: (1)
L467 return items[0] (1)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (3)
L181 lo = hi = 0 (3)
L182 for op, av in self.data: (8)
L183 if op is BRANCH: (5)
L192 elif op is ATOMIC_GROUP: (5)
L196 elif op is SUBPATTERN: (5)
L200 elif op in _REPEATCODES: (5)
L201 i, j = av[2].getwidth() (2)
L207 elif op in _UNITCODES: (3)
L208 lo = lo + 1 (3)
L209 hi = hi + 1 (3)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (3)
L227 return self.width (3)
L202 lo = lo + i * av[0] (2)
L203 if av[1] == MAXREPEAT and j: (2)
L204 hi = MAXWIDTH (2)
L519 if hi > MAXCODE: (1)
L520 hi = MAXCODE (1)
L521 if lo == 0: (1)
L525 prefix = [] (1)
L526 prefix_skip = 0 (1)
L527 charset = [] # not used (1)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (1)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (1)
L441 prefix = [] (1)
L442 prefixappend = prefix.append (1)
L443 prefix_skip = None (1)
L444 iscased = _get_iscased(flags) (1)
L432 if not flags & SRE_FLAG_IGNORECASE: (2)
L433 return None (2)
L445 for op, av in pattern.data: (1)
L446 if op is LITERAL: (1)
L450 elif op is SUBPATTERN: (1)
L465 break (1)
L468 return prefix, prefix_skip, False (1)
L532 if not prefix: (1)
L533 charset = _get_charset_prefix(pattern, flags) (1)
L471 while True: (1)
L472 if not pattern.data: (1)
L474 op, av = pattern.data[0] (1)
L475 if op is not SUBPATTERN: (1)
L476 break (1)
L482 iscased = _get_iscased(flags) (1)
L483 if op is LITERAL: (1)
L487 elif op is BRANCH: (1)
L499 elif op is IN: (1)
L512 return None (1)
L539 emit = code.append (1)
L540 emit(INFO) (1)
L541 skip = len(code); emit(0) (1)
L543 mask = 0 (1)
L544 if prefix: (1)
L548 elif charset: (1)
L550 emit(mask) (1)
L552 if lo < MAXCODE: (1)
L553 emit(lo) (1)
L557 emit(hi) (1)
L559 if prefix: (1)
L567 elif charset: (1)
L571 code[skip] = len(code) - skip (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (3)
L40 _len = len (3)
L41 LITERAL_CODES = _LITERAL_CODES (3)
L42 REPEATING_CODES = _REPEATING_CODES (3)
L43 SUCCESS_CODES = _SUCCESS_CODES (3)
L44 ASSERT_CODES = _ASSERT_CODES (3)
L45 iscased = None (3)
L46 tolower = None (3)
L47 fixes = None (3)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (3)
L56 for op, av in pattern: (8)
_parser.py (4)
L168 if isinstance(index, slice): (4)
L170 return self.data[index] (4)
L57 if op in LITERAL_CODES: (5)
L85 elif op is IN: (4)
L98 elif op is ANY: (2)
L103 elif op in REPEATING_CODES: (2)
L104 if _simple(av[2]): (2)
L403 if len(p) != 1: (2)
_parser.py (2)
L164 return len(self.data) (2)
L405 op, av = p[0] (2)
_parser.py (2)
L168 if isinstance(index, slice): (2)
L170 return self.data[index] (2)
L406 if op is SUBPATTERN: (2)
L408 return op in _UNIT_CODES (2)
L105 emit(REPEATING_CODES[op][2]) (2)
L106 skip = _len(code); emit(0) (2)
L107 emit(av[0]) (2)
L108 emit(av[1]) (2)
L109 _compile(code, av[2], flags) (2)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (2)
L243 out = [] (2)
L244 tail = [] (2)
L245 charmap = bytearray(256) (2)
L246 hascased = False (2)
L247 for op, av in charset: (4)
L248 while True: (2)
L249 try: (2)
L250 if op is LITERAL: (2)
L261 elif op is RANGE: (2)
L278 elif op is NEGATE: (2)
L281 tail.append((op, av)) (2)
L309 break (2)
L312 runs = [] (2)
L313 q = 0 (2)
L314 while True: (2)
L315 p = charmap.find(1, q) (2)
L316 if p < 0: (2)
L317 break (2)
L326 if runs is not None: (2)
L328 for p, q in runs: (2)
L333 out += tail (2)
L335 if hascased or len(out) < len(charset): (2)
L338 return charset, hascased (2)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (2)
L89 elif not hascased: (2)
L90 emit(IN) (2)
L95 skip = _len(code); emit(0) (2)
L96 _compile_charset(charset, flags, code) (2)
L216 emit = code.append (2)
L217 for op, av in charset: (4)
L218 emit(op) (2)
L219 if op is NEGATE: (2)
L221 elif op is LITERAL: (2)
L223 elif op is RANGE or op is RANGE_UNI_IGNORE: (2)
L226 elif op is CHARSET: (2)
L228 elif op is BIGCHARSET: (2)
L230 elif op is CATEGORY: (2)
L231 if flags & SRE_FLAG_LOCALE: (2)
L233 elif flags & SRE_FLAG_UNICODE: (2)
L234 emit(CH_UNICODE[av]) (2)
L239 emit(FAILURE) (2)
L97 code[skip] = _len(code) - skip (2)
L110 emit(SUCCESS) (2)
L111 code[skip] = _len(code) - skip (2)
L58 if not flags & SRE_FLAG_IGNORECASE: (1)
L59 emit(op) (1)
L60 emit(av) (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (1)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L145 space_re = re.compile(r'\s+$') (1)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (4)
L241 try: (4)
L242 char = self.decoded_string[index] (4)
L246 if char == "\\": (3)
L247 index += 1 (1)
L248 try: (1)
L249 char += self.decoded_string[index] (1)
L253 self.index = index + 1 (3)
L254 self.next = char (3)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (1)
L455 itemsappend = items.append (1)
L456 sourcematch = source.match (1)
L457 start = source.tell() (1)
L293 return self.index - len(self.next or '') (2)
L458 while True: (1)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (2)
L460 not nested and not items)) (1)
L513 subpattern = SubPattern(state) (1)
L113 self.state = state (2)
L114 if data is None: (2)
L115 data = [] (1)
L116 self.data = data (2)
L117 self.width = None (2)
L516 subpatternappend = subpattern.append (1)
L517 sourceget = source.get (1)
L518 sourcematch = source.match (1)
L519 _len = len (1)
L520 _ord = ord (1)
L522 while True: (4)
L524 this = source.next (4)
L525 if this is None: (4)
L527 if this in "|)": (3)
L529 sourceget() (3)
L261 this = self.next (3)
L262 self.__next() (3)
L263 return this (3)
L531 if verbose: (3)
L542 if this[0] == "\\": (3)
L543 code = _escape(source, this, state) (1)
L373 code = CATEGORIES.get(escape) (1)
L374 if code: (1)
L375 return code (1)
L544 subpatternappend(code) (1)
L176 self.data.append(code) (2)
L546 elif this not in SPECIAL_CHARS: (2)
L549 elif this == "[": (2)
L638 elif this in REPEAT_CHARS: (2)
L640 here = source.tell() (1)
L641 if this == "?": (1)
L643 elif this == "*": (1)
L646 elif this == "+": (1)
L647 min, max = 1, MAXREPEAT (1)
L681 if subpattern: (1)
L164 return len(self.data) (3)
L682 item = subpattern[-1:] (1)
L168 if isinstance(index, slice): (6)
L169 return SubPattern(self.state, self.data[index]) (1)
L685 if not item or item[0][0] is AT: (1)
L170 return self.data[index] (5)
L688 if item[0][0] in _REPEATCODES: (1)
L691 if item[0][0] is SUBPATTERN: (1)
L695 if sourcematch("?"): (1)
L256 if char == self.next: (3)
L259 return False (3)
L698 elif sourcematch("+"): (1)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (1)
L172 self.data[index] = code (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L705 elif this == ".": (1)
L708 elif this == "(": (1)
L875 elif this == "^": (1)
L878 elif this == "$": (1)
L879 subpatternappend((AT, AT_END)) (1)
L526 break # end of pattern (1)
L885 for i in range(len(subpattern))[::-1]: (3)
L886 op, av = subpattern[i] (2)
L887 if op is SUBPATTERN: (2)
L892 return subpattern (1)
L461 if not sourcematch("|"): (1)
L462 break (1)
L466 if len(items) == 1: (1)
L467 return items[0] (1)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (2)
L182 for op, av in self.data: (5)
L183 if op is BRANCH: (3)
L192 elif op is ATOMIC_GROUP: (3)
L196 elif op is SUBPATTERN: (3)
L200 elif op in _REPEATCODES: (3)
L201 i, j = av[2].getwidth() (1)
L207 elif op in _UNITCODES: (2)
L208 lo = lo + 1 (1)
L209 hi = hi + 1 (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (2)
L227 return self.width (2)
L202 lo = lo + i * av[0] (1)
L203 if av[1] == MAXREPEAT and j: (1)
L204 hi = MAXWIDTH (1)
L210 elif op is GROUPREF: (1)
L214 elif op is GROUPREF_EXISTS: (1)
L224 elif op is SUCCESS: (1)
L519 if hi > MAXCODE: (1)
L520 hi = MAXCODE (1)
L521 if lo == 0: (1)
L525 prefix = [] (1)
L526 prefix_skip = 0 (1)
L527 charset = [] # not used (1)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (1)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (1)
L441 prefix = [] (1)
L442 prefixappend = prefix.append (1)
L443 prefix_skip = None (1)
L444 iscased = _get_iscased(flags) (1)
L432 if not flags & SRE_FLAG_IGNORECASE: (2)
L433 return None (2)
L445 for op, av in pattern.data: (1)
L446 if op is LITERAL: (1)
L450 elif op is SUBPATTERN: (1)
L465 break (1)
L468 return prefix, prefix_skip, False (1)
L532 if not prefix: (1)
L533 charset = _get_charset_prefix(pattern, flags) (1)
L471 while True: (1)
L472 if not pattern.data: (1)
L474 op, av = pattern.data[0] (1)
L475 if op is not SUBPATTERN: (1)
L476 break (1)
L482 iscased = _get_iscased(flags) (1)
L483 if op is LITERAL: (1)
L487 elif op is BRANCH: (1)
L499 elif op is IN: (1)
L512 return None (1)
L539 emit = code.append (1)
L540 emit(INFO) (1)
L541 skip = len(code); emit(0) (1)
L543 mask = 0 (1)
L544 if prefix: (1)
L548 elif charset: (1)
L550 emit(mask) (1)
L552 if lo < MAXCODE: (1)
L553 emit(lo) (1)
L557 emit(hi) (1)
L559 if prefix: (1)
L567 elif charset: (1)
L571 code[skip] = len(code) - skip (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (2)
L40 _len = len (2)
L41 LITERAL_CODES = _LITERAL_CODES (2)
L42 REPEATING_CODES = _REPEATING_CODES (2)
L43 SUCCESS_CODES = _SUCCESS_CODES (2)
L44 ASSERT_CODES = _ASSERT_CODES (2)
L45 iscased = None (2)
L46 tolower = None (2)
L47 fixes = None (2)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (2)
L56 for op, av in pattern: (5)
_parser.py (2)
L168 if isinstance(index, slice): (2)
L170 return self.data[index] (2)
L57 if op in LITERAL_CODES: (3)
L85 elif op is IN: (3)
L98 elif op is ANY: (2)
L103 elif op in REPEATING_CODES: (2)
L104 if _simple(av[2]): (1)
L403 if len(p) != 1: (1)
_parser.py (1)
L164 return len(self.data) (1)
L405 op, av = p[0] (1)
_parser.py (1)
L168 if isinstance(index, slice): (1)
L170 return self.data[index] (1)
L406 if op is SUBPATTERN: (1)
L408 return op in _UNIT_CODES (1)
L105 emit(REPEATING_CODES[op][2]) (1)
L106 skip = _len(code); emit(0) (1)
L107 emit(av[0]) (1)
L108 emit(av[1]) (1)
L109 _compile(code, av[2], flags) (1)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (1)
L243 out = [] (1)
L244 tail = [] (1)
L245 charmap = bytearray(256) (1)
L246 hascased = False (1)
L247 for op, av in charset: (2)
L248 while True: (1)
L249 try: (1)
L250 if op is LITERAL: (1)
L261 elif op is RANGE: (1)
L278 elif op is NEGATE: (1)
L281 tail.append((op, av)) (1)
L309 break (1)
L312 runs = [] (1)
L313 q = 0 (1)
L314 while True: (1)
L315 p = charmap.find(1, q) (1)
L316 if p < 0: (1)
L317 break (1)
L326 if runs is not None: (1)
L328 for p, q in runs: (1)
L333 out += tail (1)
L335 if hascased or len(out) < len(charset): (1)
L338 return charset, hascased (1)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (1)
L89 elif not hascased: (1)
L90 emit(IN) (1)
L95 skip = _len(code); emit(0) (1)
L96 _compile_charset(charset, flags, code) (1)
L216 emit = code.append (1)
L217 for op, av in charset: (2)
L218 emit(op) (1)
L219 if op is NEGATE: (1)
L221 elif op is LITERAL: (1)
L223 elif op is RANGE or op is RANGE_UNI_IGNORE: (1)
L226 elif op is CHARSET: (1)
L228 elif op is BIGCHARSET: (1)
L230 elif op is CATEGORY: (1)
L231 if flags & SRE_FLAG_LOCALE: (1)
L233 elif flags & SRE_FLAG_UNICODE: (1)
L234 emit(CH_UNICODE[av]) (1)
L239 emit(FAILURE) (1)
L97 code[skip] = _len(code) - skip (1)
L110 emit(SUCCESS) (1)
L111 code[skip] = _len(code) - skip (1)
L120 elif op is SUBPATTERN: (1)
L130 elif op is ATOMIC_GROUP: (1)
L141 elif op in SUCCESS_CODES: (1)
L143 elif op in ASSERT_CODES: (1)
L158 elif op is AT: (1)
L159 emit(op) (1)
L160 if flags & SRE_FLAG_MULTILINE: (1)
L162 if flags & SRE_FLAG_LOCALE: (1)
L164 elif flags & SRE_FLAG_UNICODE: (1)
L165 av = AT_UNICODE.get(av, av) (1)
L166 emit(av) (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (1)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L149 _convorder = {'=': _nbo} (1)
L151 def _commastring(astr): (1)
L210 class dummy_ctype: (2)
L212 def __init__(self, cls): (1)
L215 def __mul__(self, other): (1)
L218 def __call__(self, *other): (1)
L221 def __eq__(self, other): (1)
L224 def __ne__(self, other): (1)
L227 def _getintp_ctype(): (1)
L248 _getintp_ctype.cache = None (1)
L252 class _missing_ctypes: (2)
L253 def cast(self, num, obj): (1)
L256 class c_void_p: (2)
L257 def __init__(self, ptr): (1)
L261 class _ctypes: (2)
L262 def __init__(self, array, ptr=None): (1)
L279 def data_as(self, obj): (1)
L298 def shape_as(self, obj): (1)
L307 def strides_as(self, obj): (1)
L316 @property (2)
L317 def data(self): (2)
L335 @property (2)
L336 def shape(self): (2)
L347 @property (2)
L348 def strides(self): (2)
L358 @property (2)
L359 def _as_parameter_(self): (2)
L369 def get_data(self): (1)
L378 def get_shape(self): (1)
L387 def get_strides(self): (1)
L396 def get_as_parameter(self): (1)
L408 def _newnames(datatype, order): (1)
L431 def _copy_fields(ary): (1)
L449 def _promote_fields(dt1, dt2): (1)
L506 def _getfield_is_safe(oldtype, newtype, offset): (1)
L538 def _view_is_safe(oldtype, newtype): (1)
L571 _pep3118_native_map = { (19)
L572 '?': '?', (1)
L573 'c': 'S1', (1)
L574 'b': 'b', (1)
L575 'B': 'B', (1)
L576 'h': 'h', (1)
L577 'H': 'H', (1)
L578 'i': 'i', (1)
L579 'I': 'I', (1)
L580 'l': 'l', (1)
L581 'L': 'L', (1)
L582 'q': 'q', (1)
L583 'Q': 'Q', (1)
L584 'e': 'e', (1)
L585 'f': 'f', (1)
L586 'd': 'd', (1)
L587 'g': 'g', (1)
L588 'Zf': 'F', (1)
L589 'Zd': 'D', (1)
L590 'Zg': 'G', (1)
L591 's': 'S', (1)
L592 'w': 'U', (1)
L593 'O': 'O', (1)
L594 'x': 'V', # padding (1)
L596 _pep3118_native_typechars = ''.join(_pep3118_native_map.keys()) (1)
L598 _pep3118_standard_map = { (19)
L599 '?': '?', (1)
L600 'c': 'S1', (1)
L601 'b': 'b', (1)
L602 'B': 'B', (1)
L603 'h': 'i2', (1)
L604 'H': 'u2', (1)
L605 'i': 'i4', (1)
L606 'I': 'u4', (1)
L607 'l': 'i4', (1)
L608 'L': 'u4', (1)
L609 'q': 'i8', (1)
L610 'Q': 'u8', (1)
L611 'e': 'f2', (1)
L612 'f': 'f', (1)
L613 'd': 'd', (1)
L614 'Zf': 'F', (1)
L615 'Zd': 'D', (1)
L616 's': 'S', (1)
L617 'w': 'U', (1)
L618 'O': 'O', (1)
L619 'x': 'V', # padding (1)
L621 _pep3118_standard_typechars = ''.join(_pep3118_standard_map.keys()) (1)
L624 'u': 'UCS-2 strings', (1)
L625 '&': 'pointers', (1)
L626 't': 'bitfields', (1)
L627 'X': 'function pointers', (1)
L623 _pep3118_unsupported_map = { (1)
L630 class _Stream: (2)
L631 def __init__(self, s): (1)
L635 def advance(self, n): (1)
L640 def consume(self, c): (1)
L646 def consume_until(self, c): (1)
L658 @property (2)
L659 def next(self): (2)
L662 def __bool__(self): (1)
L666 def _dtype_from_pep3118(spec): (1)
L671 def __dtype_from_pep3118(stream, is_subdtype): (1)
L819 def _fix_names(field_spec): (1)
L834 def _add_trailing_padding(value, padding): (1)
L856 def _prod(a): (1)
L862 def _gcd(a, b): (1)
L871 def _lcm(a, b): (1)
L874 def array_ufunc_errmsg_formatter(dummy, ufunc, method, *inputs, **kwargs): (1)
L886 def array_function_errmsg_formatter(public_api, types): (1)
L893 def _ufunc_doc_signature_formatter(ufunc): (1)
L941 def npy_ctypes_check(cls): (1)
L960 def _convert_to_stringdtype_kwargs(coerce, na_object=_NoValue): (1)
__config__.py (1)
L10 __all__ = ["show_config"] (1)
L11 _built_with_meson = True (1)
L14 class DisplayModes(Enum): (2)
enum.py (2)
L487 metacls._check_for_existing_members_(cls, bases) (1)
L938 for chain in bases: (2)
L939 for base in chain.__mro__: (3)
L940 if isinstance(base, EnumType) and base._member_names_: (2)
L489 enum_dict = EnumDict(cls) (1)
L347 super().__init__() (1)
L348 self._member_names = {} # use a dict -- faster look-up than a list, and keeps insertion order since 3.7 (1)
L349 self._last_values = [] (1)
L350 self._ignore = [] (1)
L351 self._auto_called = False (1)
L352 self._cls_name = cls_name (1)
L491 member_type, first_enum = metacls._get_mixins_(cls, bases) (1)
L954 if not bases: (1)
L958 first_enum = bases[-1] (1)
L959 if not isinstance(first_enum, EnumType): (1)
L962 member_type = mcls._find_data_type_(class_name, bases) or object (1)
L990 data_types = set() (1)
L991 base_chain = set() (1)
L992 for chain in bases: (2)
L993 candidate = None (1)
L994 for base in chain.__mro__: (3)
L995 base_chain.add(base) (2)
L996 if base is object: (2)
L998 elif isinstance(base, EnumType): (1)
L999 if base._member_type_ is not object: (1)
L997 continue (1)
L1007 if len(data_types) > 1: (1)
L1009 elif data_types: (1)
L1012 return None (1)
L963 return member_type, first_enum (1)
L492 if first_enum is not None: (1)
L493 enum_dict['_generate_next_value_'] = getattr( (2)
L494 first_enum, '_generate_next_value_', None, (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (4)
L78 def _is_private(cls_name, name): (4)
L80 pattern = '_%s__' % (cls_name, ) (4)
L81 pat_len = len(pattern) (4)
L83 len(name) > pat_len (4)
L84 and name.startswith(pattern) (1)
L89 return False (4)
L366 elif _is_sunder(key): (4)
L63 len(name) > 2 and (12)
L64 name[0] == name[-1] == '_' and (4)
L65 name[1] != '_' and (4)
L66 name[-2] != '_' (1)
L62 return ( (4)
L367 if key not in ( (1)
L380 if key == '_generate_next_value_': (1)
L382 if self._auto_called: (1)
L384 _gnv = value.__func__ if isinstance(value, staticmethod) else value (1)
L385 setattr(self, '_generate_next_value', _gnv) (1)
L460 super().__setitem__(key, value) (4)
L496 return enum_dict (1)
L398 elif _is_dunder(key): (3)
L52 len(name) > 4 and (9)
L53 name[:2] == name[-2:] == '__' and (3)
L54 name[2] != '_' and (3)
L55 name[-3] != '_' (3)
L51 return ( (3)
L399 if key == '__order__': (3)
L15 stdout = "stdout" (1)
enum.py (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (1)
L78 def _is_private(cls_name, name): (1)
L80 pattern = '_%s__' % (cls_name, ) (1)
L81 pat_len = len(pattern) (1)
L83 len(name) > pat_len (1)
L89 return False (1)
L366 elif _is_sunder(key): (1)
L63 len(name) > 2 and (2)
L64 name[0] == name[-1] == '_' and (1)
L62 return ( (1)
L398 elif _is_dunder(key): (1)
L52 len(name) > 4 and (2)
L53 name[:2] == name[-2:] == '__' and (1)
L51 return ( (1)
L401 elif key in self._member_names: (1)
L404 elif key in self._ignore: (1)
L406 elif isinstance(value, nonmember): (1)
L409 elif isinstance(value, partial): (1)
L415 elif _is_descriptor(value): (1)
L41 return not isinstance(obj, partial) and ( (2)
L42 hasattr(obj, '__get__') or (2)
L43 hasattr(obj, '__set__') or (1)
L44 hasattr(obj, '__delete__') (1)
L417 elif self._cls_name is not None and _is_internal_class(self._cls_name, value): (1)
L71 if not isinstance(obj, type): (1)
L72 return False (1)
L421 if key in self: (1)
L424 elif isinstance(value, member): (1)
L427 non_auto_store = True (1)
L428 single = False (1)
L429 if isinstance(value, auto): (1)
L432 if isinstance(value, tuple) and any(isinstance(v, auto) for v in value): (1)
L457 self._member_names[key] = None (1)
L458 if non_auto_store: (1)
L459 self._last_values.append(value) (1)
L460 super().__setitem__(key, value) (1)
L16 dicts = "dicts" (1)
enum.py (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (2)
L78 def _is_private(cls_name, name): (2)
L80 pattern = '_%s__' % (cls_name, ) (2)
L81 pat_len = len(pattern) (2)
L83 len(name) > pat_len (2)
L89 return False (2)
L366 elif _is_sunder(key): (2)
L63 len(name) > 2 and (5)
L64 name[0] == name[-1] == '_' and (2)
L62 return ( (2)
L398 elif _is_dunder(key): (2)
L52 len(name) > 4 and (5)
L53 name[:2] == name[-2:] == '__' and (2)
L51 return ( (2)
L401 elif key in self._member_names: (1)
L404 elif key in self._ignore: (1)
L406 elif isinstance(value, nonmember): (1)
L409 elif isinstance(value, partial): (1)
L415 elif _is_descriptor(value): (1)
L41 return not isinstance(obj, partial) and ( (2)
L42 hasattr(obj, '__get__') or (2)
L43 hasattr(obj, '__set__') or (1)
L44 hasattr(obj, '__delete__') (1)
L417 elif self._cls_name is not None and _is_internal_class(self._cls_name, value): (1)
L71 if not isinstance(obj, type): (1)
L72 return False (1)
L421 if key in self: (1)
L424 elif isinstance(value, member): (1)
L427 non_auto_store = True (1)
L428 single = False (1)
L429 if isinstance(value, auto): (1)
L432 if isinstance(value, tuple) and any(isinstance(v, auto) for v in value): (1)
L457 self._member_names[key] = None (1)
L458 if non_auto_store: (1)
L459 self._last_values.append(value) (1)
L460 super().__setitem__(key, value) (2)
L84 and name.startswith(pattern) (1)
L65 name[1] != '_' and (1)
L54 name[2] != '_' and (1)
L55 name[-3] != '_' (1)
L399 if key == '__order__': (1)
L504 if _simple: (1)
L508 classdict.setdefault('_ignore_', []).append('_ignore_') (1)
L509 ignore = classdict['_ignore_'] (1)
L510 for key in ignore: (2)
L511 classdict.pop(key, None) (1)
L514 member_names = classdict._member_names (1)
L517 invalid_names = set(member_names) & {'mro', ''} (1)
L518 if invalid_names: (1)
L524 _order_ = classdict.pop('_order_', None) (1)
L525 _gnv = classdict.get('_generate_next_value_') (1)
L526 if _gnv is not None and type(_gnv) is not staticmethod: (1)
L527 _gnv = staticmethod(_gnv) (1)
L529 classdict = dict(classdict.items()) (1)
L530 if _gnv is not None: (1)
L531 classdict['_generate_next_value_'] = _gnv (1)
L534 member_type, first_enum = metacls._get_mixins_(cls, bases) (1)
L954 if not bases: (1)
L958 first_enum = bases[-1] (1)
L959 if not isinstance(first_enum, EnumType): (1)
L962 member_type = mcls._find_data_type_(class_name, bases) or object (1)
L990 data_types = set() (1)
L991 base_chain = set() (1)
L992 for chain in bases: (2)
L993 candidate = None (1)
L994 for base in chain.__mro__: (3)
L995 base_chain.add(base) (2)
L996 if base is object: (2)
L998 elif isinstance(base, EnumType): (1)
L999 if base._member_type_ is not object: (1)
L997 continue (1)
L1007 if len(data_types) > 1: (1)
L1009 elif data_types: (1)
L1012 return None (1)
L963 return member_type, first_enum (1)
L535 __new__, save_new, use_args = metacls._find_new_( (2)
L536 classdict, member_type, first_enum, (1)
L1026 __new__ = classdict.get('__new__', None) (1)
L1029 save_new = first_enum is not None and __new__ is not None (1)
L1031 if __new__ is None: (1)
L1034 for method in ('__new_member__', '__new__'): (3)
L1035 for possible in (member_type, first_enum): (6)
L1036 target = getattr(possible, method, None) (4)
L1037 if target not in { (8)
L1038 None, (4)
L1039 None.__new__, (4)
L1040 object.__new__, (4)
L1041 Enum.__new__, (4)
L1045 if __new__ is not None: (2)
L1048 __new__ = object.__new__ (1)
L1053 if first_enum is None or __new__ in (Enum.__new__, object.__new__): (1)
L1054 use_args = False (1)
L1057 return __new__, save_new, use_args (1)
L538 classdict['_new_member_'] = __new__ (1)
L539 classdict['_use_args_'] = use_args (1)
L542 for name in member_names: (3)
L543 value = classdict[name] (2)
L544 classdict[name] = _proto_member(value) (2)
L249 self.value = value (2)
L547 classdict['_member_names_'] = [] (1)
L548 classdict['_member_map_'] = {} (1)
L549 classdict['_value2member_map_'] = {} (1)
L550 classdict['_hashable_values_'] = [] # for comparing with non-hashable types (1)
L551 classdict['_unhashable_values_'] = [] # e.g. frozenset() with set() (1)
L552 classdict['_unhashable_values_map_'] = {} (1)
L553 classdict['_member_type_'] = member_type (1)
L555 classdict['_value_repr_'] = metacls._find_data_repr_(cls, bases) (1)
L967 for chain in bases: (1)
L968 for base in chain.__mro__: (1)
L969 if base is object: (1)
L971 elif isinstance(base, EnumType): (1)
L973 return base._value_repr_ (1)
L559 boundary (1)
L560 or getattr(first_enum, '_boundary_', None) (1)
L558 classdict['_boundary_'] = ( (1)
L562 classdict['_flag_mask_'] = 0 (1)
L563 classdict['_singles_mask_'] = 0 (1)
L564 classdict['_all_bits_'] = 0 (1)
L565 classdict['_inverted_'] = None (1)
L566 try: (1)
L567 classdict['_%s__in_progress' % cls] = True (1)
L568 enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) (1)
L256 delattr(enum_class, member_name) (2)
L767 if attr in cls._member_map_: (8)
L769 super().__delattr__(attr) (8)
L258 value = self.value (2)
L259 if not isinstance(value, tuple): (2)
L260 args = (value, ) (2)
L263 if enum_class._member_type_ is tuple: # special case for tuple enums (2)
L265 if not enum_class._use_args_: (2)
L266 enum_member = enum_class._new_member_(enum_class) (2)
L269 if not hasattr(enum_member, '_value_'): (2)
L270 if enum_class._member_type_ is object: (2)
L271 enum_member._value_ = value (2)
L281 value = enum_member._value_ (2)
L282 enum_member._name_ = member_name (2)
L283 enum_member.__objclass__ = enum_class (2)
L284 enum_member.__init__(*args) (2)
L1218 pass (2)
L285 enum_member._sort_order_ = len(enum_class._member_names_) (2)
L287 if Flag is not None and issubclass(enum_class, Flag): (2)
L296 try: (2)
L297 try: (2)
L299 enum_member = enum_class._value2member_map_[value] (2)
L300 except TypeError: (2)
L307 except KeyError: (2)
L311 Flag is None (2)
L312 or not issubclass(enum_class, Flag) (2)
L315 enum_class._member_names_.append(member_name) (2)
L325 enum_class._add_member_(member_name, enum_member) (2)
L1061 if name in cls._member_map_: (2)
L1067 found_descriptor = None (2)
L1068 descriptor_type = None (2)
L1069 class_type = None (2)
L1070 for base in cls.__mro__[1:]: (6)
L1071 attr = base.__dict__.get(name) (4)
L1072 if attr is not None: (4)
L1086 if found_descriptor: (2)
L1102 setattr(cls, name, member) (2)
L837 member_map = cls.__dict__.get('_member_map_', {}) (3)
L838 if name in member_map: (3)
L840 super().__setattr__(name, value) (3)
L1104 cls._member_map_[name] = member (2)
L326 try: (2)
L330 enum_class._value2member_map_.setdefault(value, enum_member) (2)
L331 if value not in enum_class._hashable_values_: (2)
L332 enum_class._hashable_values_.append(value) (2)
L569 classdict['_%s__in_progress' % cls] = False (1)
L570 delattr(enum_class, '_%s__in_progress' % cls) (1)
L578 classdict.update(enum_class.__dict__) (1)
L586 if ReprEnum is not None and ReprEnum in bases: (1)
L603 for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): (5)
L604 if name not in classdict: (4)
L606 enum_method = getattr(first_enum, name) (4)
L607 found_method = getattr(enum_class, name) (4)
L608 object_method = getattr(object, name) (4)
L609 data_type_method = getattr(member_type, name) (4)
L610 if found_method in (data_type_method, object_method): (4)
L614 if Flag is not None and issubclass(enum_class, Flag): (1)
L627 if Enum is not None: (1)
L630 if save_new: (1)
L632 enum_class.__new__ = Enum.__new__ (1)
L643 if _order_ is not None: (1)
L649 Flag is None and cls != 'Flag' (1)
L650 or Flag is not None and not issubclass(enum_class, Flag) (1)
L652 delattr(enum_class, '_boundary_') (1)
L653 delattr(enum_class, '_flag_mask_') (1)
L654 delattr(enum_class, '_singles_mask_') (1)
L655 delattr(enum_class, '_all_bits_') (1)
L656 delattr(enum_class, '_inverted_') (1)
L670 if _order_: (1)
L687 return enum_class (1)
L19 def _cleanup(d): (1)
L30 CONFIG = _cleanup( (2)
L34 "name": "msvc", (1)
L35 "linker": r"link", (1)
L36 "version": "19.29.30158", (1)
L37 "commands": r"cl", (1)
L38 "args": r"", (1)
L39 "linker args": r"", (1)
L33 "c": { (1)
L42 "name": "cython", (1)
L43 "linker": r"cython", (1)
L44 "version": "3.0.12", (1)
L45 "commands": r"cython", (1)
L46 "args": r"", (1)
L47 "linker args": r"", (1)
L41 "cython": { (1)
L50 "name": "msvc", (1)
L51 "linker": r"link", (1)
L52 "version": "19.29.30158", (1)
L53 "commands": r"cl", (1)
L54 "args": r"", (1)
L55 "linker args": r"", (1)
L49 "c++": { (1)
L32 "Compilers": { (1)
L60 "cpu": "x86_64", (1)
L61 "family": "x86_64", (1)
L62 "endian": "little", (1)
L63 "system": "windows", (1)
L59 "host": { (1)
L66 "cpu": "x86_64", (1)
L67 "family": "x86_64", (1)
L68 "endian": "little", (1)
L69 "system": "windows", (1)
L65 "build": { (1)
L71 "cross-compiled": bool("False".lower().replace("false", "")), (1)
L58 "Machine Information": { (1)
L75 "name": "scipy-openblas", (1)
L76 "found": bool("True".lower().replace("false", "")), (1)
L77 "version": "0.3.28", (1)
L78 "detection method": "pkgconfig", (1)
L79 "include directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-u8afkksu/cp313-win_amd64/build/venv/Lib/site-packages/scipy_openblas64/include", (1)
L80 "lib directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-u8afkksu/cp313-win_amd64/build/venv/Lib/site-packages/scipy_openblas64/lib", (1)
L81 "openblas configuration": r"OpenBLAS 0.3.28 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=24", (1)
L82 "pc file directory": r"D:/a/numpy/numpy/.openblas", (1)
L74 "blas": { (1)
L85 "name": "scipy-openblas", (1)
L86 "found": bool("True".lower().replace("false", "")), (1)
L87 "version": "0.3.28", (1)
L88 "detection method": "pkgconfig", (1)
L89 "include directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-u8afkksu/cp313-win_amd64/build/venv/Lib/site-packages/scipy_openblas64/include", (1)
L90 "lib directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-u8afkksu/cp313-win_amd64/build/venv/Lib/site-packages/scipy_openblas64/lib", (1)
L91 "openblas configuration": r"OpenBLAS 0.3.28 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=24", (1)
L92 "pc file directory": r"D:/a/numpy/numpy/.openblas", (1)
L84 "lapack": { (1)
L73 "Build Dependencies": { (1)
L96 "path": r"C:\Users\runneradmin\AppData\Local\Temp\build-env-vu_ki1u0\Scripts\python.exe", (1)
L97 "version": "3.13", (1)
L95 "Python Information": { (1)
L100 "baseline": __cpu_baseline__, (1)
L102 feature for feature in __cpu_dispatch__ if __cpu_features__[feature] (16)
L101 "found": [ (2)
L105 feature for feature in __cpu_dispatch__ if not __cpu_features__[feature] (16)
L104 "not found": [ (2)
L99 "SIMD Extensions": { (1)
L31 { (1)
L24 if isinstance(d, dict): (343)
L25 return {k: _cleanup(v) for k, v in d.items() if v and _cleanup(v)} (238)
L27 return d (304)
L112 def _check_pyyaml(): (1)
L118 def show(mode=DisplayModes.stdout.value): (1)
enum.py (1)
L200 if instance is None: (1)
L207 if self.fget is not None: (1)
L209 return self.fget(instance) (1)
L1340 return self._value_ (1)
L165 def show_config(mode=DisplayModes.stdout.value): (1)
enum.py (1)
L200 if instance is None: (1)
L207 if self.fget is not None: (1)
L209 return self.fget(instance) (1)
L1340 return self._value_ (1)
L169 show_config.__doc__ = show.__doc__ (1)
L170 show_config.__module__ = "numpy" (1)
_utils_impl.py (2)
L4 import types (1)
L5 import warnings (1)
L6 import functools (1)
L7 import platform (1)
L9 from numpy._core import ndarray (1)
platform.py (1)
L135 'dev': 10, (1)
L136 'alpha': 20, 'a': 20, (1)
L137 'beta': 30, 'b': 30, (1)
L138 'c': 40, (1)
L139 'RC': 50, 'rc': 50, (1)
L141 'pl': 200, 'p': 200, (1)
L133 _ver_stages = { (1)
L145 def _comparable_version(version): (1)
L161 def libc_ver(executable=None, lib='', version='', chunksize=16384): (1)
L241 def _norm_version(version, build=''): (1)
L266 def _syscmd_ver(system='', release='', version='', (2)
L268 supported_platforms=('win32', 'win16', 'dos')): (1)
L321 def _wmi_query(table, *keys): (1)
L342 _WIN32_CLIENT_RELEASES = [ (1)
L356 _WIN32_SERVER_RELEASES = [ (1)
L370 def win32_is_iot(): (1)
L373 def win32_edition(): (1)
L388 def _win32_ver(version, csd, ptype): (1)
L447 def win32_ver(release='', version='', csd='', ptype=''): (1)
L460 def _mac_ver_xml(): (1)
L482 def mac_ver(release='', versioninfo=('', '', ''), machine=''): (1)
L503 IOSVersionInfo = collections.namedtuple( (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (6)
L400 if type(name) is not str: (5)
L402 if not name.isidentifier(): (5)
L405 if _iskeyword(name): (5)
L409 seen = set() (1)
L410 for name in field_names: (5)
L411 if name.startswith('_') and not rename: (4)
L414 if name in seen: (4)
L416 seen.add(name) (4)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (6)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (5)
L509 doc = _sys.intern(f'Alias for field number {index}') (4)
L510 class_namespace[name] = _tuplegetter(index, doc) (4)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L520 try: (1)
L521 module = _sys._getframemodulename(1) or '__main__' (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L504 "IOSVersionInfo", (1)
L505 ["system", "release", "model", "is_simulator"] (1)
L509 def ios_ver(system="", release="", model="", is_simulator=False): (1)
L525 def _java_getprop(name, default): (1)
L536 def java_ver(release='', vendor='', vminfo=('', '', ''), osinfo=('', '', '')): (1)
L572 AndroidVer = collections.namedtuple( (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L385 field_names = field_names.replace(',', ' ').split() (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (8)
L400 if type(name) is not str: (7)
L402 if not name.isidentifier(): (7)
L405 if _iskeyword(name): (7)
L409 seen = set() (1)
L410 for name in field_names: (7)
L411 if name.startswith('_') and not rename: (6)
L414 if name in seen: (6)
L416 seen.add(name) (6)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (8)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (7)
L509 doc = _sys.intern(f'Alias for field number {index}') (6)
L510 class_namespace[name] = _tuplegetter(index, doc) (6)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L520 try: (1)
L521 module = _sys._getframemodulename(1) or '__main__' (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L573 "AndroidVer", "release api_level manufacturer model device is_emulator") (1)
L575 def android_ver(release="", api_level=0, manufacturer="", model="", device="", (2)
L576 is_emulator=False): (1)
L614 def system_alias(system, release, version): (1)
L656 def _platform(*args): (1)
L688 def _node(default=''): (1)
L703 def _follow_symlinks(filepath): (1)
L715 def _syscmd_file(target, default=''): (1)
L754 'win32': ('', 'WindowsPE'), (1)
L755 'win16': ('', 'Windows'), (1)
L756 'dos': ('', 'MSDOS'), (1)
L753 _default_architecture = { (1)
L759 def architecture(executable=sys.executable, bits='', linkage=''): (1)
L837 def _get_machine_win32(): (1)
L865 class _Processor: (2)
L866 @classmethod (2)
L867 def get(cls): (2)
L871 def get_win32(): (1)
L879 def get_OpenVMS(): (1)
L891 def get_ios(): (1)
L896 def from_subprocess(): (1)
L915 def _unknown_as_blank(val): (1)
L921 class uname_result( (3)
L922 collections.namedtuple( (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L385 field_names = field_names.replace(',', ' ').split() (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (7)
L400 if type(name) is not str: (6)
L402 if not name.isidentifier(): (6)
L405 if _iskeyword(name): (6)
L409 seen = set() (1)
L410 for name in field_names: (6)
L411 if name.startswith('_') and not rename: (5)
L414 if name in seen: (5)
L416 seen.add(name) (5)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (7)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (6)
L509 doc = _sys.intern(f'Alias for field number {index}') (5)
L510 class_namespace[name] = _tuplegetter(index, doc) (5)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L520 try: (1)
L521 module = _sys._getframemodulename(1) or '__main__' (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L923 "uname_result_base", (1)
L924 "system node release version machine") (1)
L926 """ (1)
L933 _fields = ('system', 'node', 'release', 'version', 'machine', 'processor') (1)
L935 @functools.cached_property (2)
functools.py (1)
L996 self.func = func (1)
L997 self.attrname = None (1)
L998 self.__doc__ = func.__doc__ (1)
L999 self.__module__ = func.__module__ (1)
L936 def processor(self): (2)
L939 def __iter__(self): (1)
L945 @classmethod (2)
L946 def _make(cls, iterable): (2)
L955 def __getitem__(self, key): (1)
L958 def __len__(self): (1)
L961 def __reduce__(self): (1)
functools.py (1)
L1002 if self.attrname is None: (1)
L1003 self.attrname = name (1)
L965 _uname_cache = None (1)
L968 def uname(): (1)
L1066 def system(): (1)
L1075 def node(): (1)
L1085 def release(): (1)
L1094 def version(): (1)
L1103 def machine(): (1)
L1112 def processor(): (1)
L1126 _sys_version_cache = {} (1)
L1128 def _sys_version(sys_version=None): (1)
L1232 def python_implementation(): (1)
L1244 def python_version(): (1)
L1254 def python_version_tuple(): (1)
L1265 def python_branch(): (1)
L1279 def python_revision(): (1)
L1292 def python_build(): (1)
L1300 def python_compiler(): (1)
L1310 _platform_cache = {} (1)
L1312 def platform(aliased=False, terse=False): (1)
L1393 _os_release_candidates = ("/etc/os-release", "/usr/lib/os-release") (1)
L1394 _os_release_cache = None (1)
L1397 def _parse_os_release(lines): (1)
L1424 def freedesktop_os_release(): (1)
L1449 if __name__ == '__main__': (1)
format.py (1)
L173 __all__ = [] (1)
L175 drop_metadata.__module__ = "numpy.lib.format" (1)
L177 EXPECTED_KEYS = {'descr', 'fortran_order', 'shape'} (1)
L178 MAGIC_PREFIX = b'\x93NUMPY' (1)
L179 MAGIC_LEN = len(MAGIC_PREFIX) + 2 (1)
L180 ARRAY_ALIGN = 64 # plausible values are powers of 2 between 16 and 4096 (1)
L181 BUFFER_SIZE = 2**18 # size of buffer for reading npz files in bytes (1)
L183 GROWTH_AXIS_MAX_DIGITS = 21 # = len(str(8*2**64-1)) hypothetical int1 dtype (1)
L188 (1, 0): ('<H', 'latin1'), (1)
L189 (2, 0): ('<I', 'latin1'), (1)
L190 (3, 0): ('<I', 'utf8'), (1)
L187 _header_size_info = { (1)
L196 _MAX_HEADER_SIZE = 10000 (1)
L198 def _check_version(version): (1)
L203 def magic(major, minor): (1)
L225 def read_magic(fp): (1)
L245 def dtype_to_descr(dtype): (1)
L303 def descr_to_dtype(descr): (1)
L359 def header_data_from_array_1_0(array): (1)
L387 def _wrap_header(header, version): (1)
L411 def _wrap_header_guess_version(header): (1)
L435 def _write_array_header(fp, d, version=None): (1)
L470 def write_array_header_1_0(fp, d): (1)
L483 def write_array_header_2_0(fp, d): (1)
L496 def read_array_header_1_0(fp, max_header_size=_MAX_HEADER_SIZE): (1)
L532 def read_array_header_2_0(fp, max_header_size=_MAX_HEADER_SIZE): (1)
L569 def _filter_header(s): (1)
L604 def _read_array_header(fp, version, max_header_size=_MAX_HEADER_SIZE): (1)
L684 def write_array(fp, array, version=None, allow_pickle=True, pickle_kwargs=None): (1)
L762 def read_array(fp, allow_pickle=False, pickle_kwargs=None, *, (2)
L763 max_header_size=_MAX_HEADER_SIZE): (1)
L864 def open_memmap(filename, mode='r+', dtype=None, shape=None, (3)
L865 fortran_order=False, version=None, *, (1)
L866 max_header_size=_MAX_HEADER_SIZE): (1)
L971 def _read_bytes(fp, size, error_template="ran out of data"): (1)
L999 def isfileobj(f): (1)
_npyio_impl.py (2)
L19 from numpy._core import overrides (1)
L28 from numpy._utils import asunicode, asbytes (1)
_type_check_impl.py (1)
L18 array_function_dispatch = functools.partial( (2)
L19 overrides.array_function_dispatch, module='numpy') (1)
L22 _typecodes_by_elsize = 'GDFgdfQqLlIiHhBb?' (1)
L25 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L26 def mintypecode(typechars, typeset='GDFgdf', default='d'): (2)
L80 def _real_dispatcher(val): (1)
L84 @array_function_dispatch(_real_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L85 def real(val): (2)
L127 def _imag_dispatcher(val): (1)
L131 @array_function_dispatch(_imag_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L132 def imag(val): (2)
L171 def _is_type_dispatcher(x): (1)
L175 @array_function_dispatch(_is_type_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L176 def iscomplex(x): (2)
L213 @array_function_dispatch(_is_type_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L214 def isreal(x): (2)
L270 @array_function_dispatch(_is_type_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L271 def iscomplexobj(x): (2)
L312 @array_function_dispatch(_is_type_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L313 def isrealobj(x): (2)
L363 def _getmaxmin(t): (1)
L369 def _nan_to_num_dispatcher(x, copy=None, nan=None, posinf=None, neginf=None): (1)
L373 @array_function_dispatch(_nan_to_num_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L374 def nan_to_num(x, copy=True, nan=0.0, posinf=None, neginf=None): (2)
L485 def _real_if_close_dispatcher(a, tol=None): (1)
L489 @array_function_dispatch(_real_if_close_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L490 def real_if_close(a, tol=100): (2)
L550 _namefromtype = {'S1': 'character', (18)
L551 '?': 'bool', (1)
L552 'b': 'signed char', (1)
L553 'B': 'unsigned char', (1)
L554 'h': 'short', (1)
L555 'H': 'unsigned short', (1)
L556 'i': 'integer', (1)
L557 'I': 'unsigned integer', (1)
L558 'l': 'long integer', (1)
L559 'L': 'unsigned long integer', (1)
L560 'q': 'long long integer', (1)
L561 'Q': 'unsigned long long integer', (1)
L562 'f': 'single precision', (1)
L563 'd': 'double precision', (1)
L564 'g': 'long precision', (1)
L565 'F': 'complex single precision', (1)
L566 'D': 'complex double precision', (1)
L567 'G': 'complex long double precision', (1)
L568 'S': 'string', (1)
L569 'U': 'unicode', (1)
L570 'V': 'void', (1)
L571 'O': 'object' (1)
L574 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L575 def typename(char): (2)
L631 array_type = [[_nx.float16, _nx.float32, _nx.float64, _nx.longdouble], (2)
L632 [None, _nx.complex64, _nx.complex128, _nx.clongdouble]] (1)
L633 array_precision = {_nx.float16: 0, (2)
L634 _nx.float32: 1, (1)
L635 _nx.float64: 2, (1)
L636 _nx.longdouble: 3, (1)
L637 _nx.complex64: 1, (1)
L638 _nx.complex128: 2, (1)
L639 _nx.clongdouble: 3} (1)
L642 def _common_type_dispatcher(*arrays): (1)
L646 @array_function_dispatch(_common_type_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L647 def common_type(*arrays): (2)
_scimath_impl.py (1)
L24 __all__ = [ (1)
L30 _ln2 = nx.log(2.0) (1)
L33 def _tocomplex(arr): (1)
L97 def _fix_real_lt_zero(x): (1)
L126 def _fix_int_lt_zero(x): (1)
L154 def _fix_real_abs_gt_1(x): (1)
L182 def _unary_dispatcher(x): (1)
L186 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L187 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L188 def sqrt(x): (2)
L242 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L243 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L244 def log(x): (2)
L292 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L293 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L294 def log10(x): (2)
L344 def _logn_dispatcher(n, x): (1)
L348 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L349 @array_function_dispatch(_logn_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L350 def logn(n, x): (2)
L386 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L387 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L388 def log2(x): (2)
L436 def _power_dispatcher(x, p): (1)
L440 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L441 @array_function_dispatch(_power_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L442 def power(x, p): (2)
L495 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L496 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L497 def arccos(x): (2)
L542 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L543 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L544 def arcsin(x): (2)
L590 @set_module('numpy.lib.scimath') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L591 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L592 def arctanh(x): (2)
typing.py (2)
L45 __all__ = [ (1)
L164 def _type_convert(arg, module=None, *, allow_special_forms=False): (1)
L173 def _type_check(arg, msg, is_argument=True, module=None, *, allow_special_forms=False): (1)
L206 def _is_param_expr(arg): (1)
L211 def _should_unflatten_callable_args(typ, args): (1)
L235 def _type_repr(obj): (1)
L260 def _collect_type_parameters(args, *, enforce_default_ordering: bool = True): (1)
L310 def _check_generic_specialization(cls, arguments): (1)
L341 def _unpack_args(*args): (1)
L351 def _deduplicate(params, *, unhashable_fallback=False): (1)
L361 def _deduplicate_unhashable(unhashable_params): (1)
L368 def _compare_args_orderless(first_args, second_args): (1)
L379 def _remove_dups_flatten(parameters): (1)
L395 def _flatten_literal_params(parameters): (1)
L406 _cleanups = [] (1)
L407 _caches = {} (1)
L410 def _tp_cache(func=None, /, *, typed=False): (1)
L441 def _deprecation_warning_for_no_type_params_passed(funcname: str) -> None: (1)
L454 class _Sentinel: (2)
L455 __slots__ = () (1)
L456 def __repr__(self): (1)
L460 _sentinel = _Sentinel() (1)
L463 def _eval_type(t, globalns, localns, type_params=_sentinel, *, recursive_guard=frozenset()): (1)
L506 class _Final: (2)
L507 """Mixin to prohibit subclassing.""" (1)
L509 __slots__ = ('__weakref__',) (1)
L511 def __init_subclass__(cls, /, *args, **kwds): (1)
L516 class _NotIterable: (2)
L517 """Mixin to prevent iteration, without being compatible with Iterable. (1)
L530 __slots__ = () (1)
L531 __iter__ = None (1)
L536 class _SpecialForm(_Final, _NotIterable, _root=True): (2)
L537 __slots__ = ('_name', '__doc__', '_getitem') (1)
L539 def __init__(self, getitem): (1)
L544 def __getattr__(self, item): (1)
L550 def __mro_entries__(self, bases): (1)
L553 def __repr__(self): (1)
L556 def __reduce__(self): (1)
L559 def __call__(self, *args, **kwds): (1)
L562 def __or__(self, other): (1)
L565 def __ror__(self, other): (1)
L568 def __instancecheck__(self, obj): (1)
L571 def __subclasscheck__(self, cls): (1)
L574 @_tp_cache (2)
L575 def __getitem__(self, parameters): (2)
L415 def decorator(func): (7)
L435 if func is not None: (7)
L436 return decorator(func) (6)
L421 cache = functools.lru_cache(typed=typed)(func) (7)
functools.py (7)
L530 if isinstance(maxsize, int): (7)
L532 if maxsize < 0: (7)
L544 def decorating_function(user_function): (7)
L549 return decorating_function (7)
L545 wrapper = _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo) (7)
L546 wrapper.cache_parameters = lambda : {'maxsize': maxsize, 'typed': typed} (7)
L547 return update_wrapper(wrapper, user_function) (7)
L51 for attr in assigned: (49)
L52 try: (42)
L53 value = getattr(wrapped, attr) (42)
L57 setattr(wrapper, attr, value) (42)
L58 for attr in updated: (14)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (7)
L62 wrapper.__wrapped__ = wrapped (7)
L64 return wrapper (7)
L422 _caches[func] = cache (7)
L423 _cleanups.append(cache.cache_clear) (7)
L424 del cache (7)
L426 @functools.wraps(func) (14)
functools.py (14)
L77 return partial(update_wrapper, wrapped=wrapped, (14)
L78 assigned=assigned, updated=updated) (7)
L51 for attr in assigned: (49)
L52 try: (42)
L53 value = getattr(wrapped, attr) (42)
L57 setattr(wrapper, attr, value) (42)
L58 for attr in updated: (14)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (7)
L62 wrapper.__wrapped__ = wrapped (7)
L64 return wrapper (7)
L427 def inner(*args, **kwds): (14)
L433 return inner (7)
L512 if '_root' not in kwds: (14)
L579 class _TypedCacheSpecialForm(_SpecialForm, _root=True): (2)
L580 def __getitem__(self, parameters): (1)
L586 class _AnyMeta(type): (2)
L587 def __instancecheck__(self, obj): (1)
L592 def __repr__(self): (1)
L598 class Any(metaclass=_AnyMeta): (2)
L599 """Special type indicating an unconstrained type. (1)
L610 def __new__(cls, *args, **kwargs): (1)
L616 @_SpecialForm (2)
L617 def NoReturn(self, parameters): (2)
L540 self._getitem = getitem (14)
L541 self._name = getitem.__name__ (14)
L542 self.__doc__ = getitem.__doc__ (14)
L637 @_SpecialForm (2)
L638 def Never(self, parameters): (2)
L662 @_SpecialForm (2)
L663 def Self(self, parameters): (2)
L682 @_SpecialForm (2)
L683 def LiteralString(self, parameters): (2)
L709 @_SpecialForm (2)
L710 def ClassVar(self, parameters): (2)
L731 @_SpecialForm (2)
L732 def Final(self, parameters): (2)
L753 @_SpecialForm (2)
L754 def Union(self, parameters): (2)
L797 def _make_union(left, right): (1)
L806 @_SpecialForm (2)
L807 def Optional(self, parameters): (2)
L812 @_TypedCacheSpecialForm (2)
L813 @_tp_cache(typed=True) (2)
L438 return decorator (1)
L814 def Literal(self, *parameters): (2)
L847 @_SpecialForm (2)
L848 def TypeAlias(self, parameters): (2)
L864 @_SpecialForm (2)
L865 def Concatenate(self, parameters): (2)
L890 @_SpecialForm (2)
L891 def TypeGuard(self, parameters): (2)
L946 @_SpecialForm (2)
L947 def TypeIs(self, parameters): (2)
L1015 class ForwardRef(_Final, _root=True): (2)
L1016 """Internal wrapper to hold a forward reference.""" (1)
L1018 __slots__ = ('__forward_arg__', '__forward_code__', (1)
L1023 def __init__(self, arg, is_argument=True, module=None, *, is_class=False): (1)
L1047 def _evaluate(self, globalns, localns, type_params=_sentinel, *, recursive_guard): (1)
L1096 def __eq__(self, other): (1)
L1105 def __hash__(self): (1)
L1108 def __or__(self, other): (1)
L1111 def __ror__(self, other): (1)
L1114 def __repr__(self): (1)
L1122 def _is_unpacked_typevartuple(x: Any) -> bool: (1)
L1127 def _is_typevar_like(x: Any) -> bool: (1)
L1131 def _typevar_subst(self, arg): (1)
L1140 def _typevartuple_prepare_subst(self, alias, args): (1)
L1181 def _paramspec_subst(self, arg): (1)
L1190 def _paramspec_prepare_subst(self, alias, args): (1)
L1207 @_tp_cache (2)
L1208 def _generic_class_getitem(cls, args): (2)
L1256 def _generic_init_subclass(cls, *args, **kwargs): (1)
L1294 def _is_dunder(attr): (1)
L1297 class _BaseGenericAlias(_Final, _root=True): (2)
L1298 """The central part of the internal API. (1)
L1307 def __init__(self, origin, *, inst=True, name=None): (1)
L1313 def __call__(self, *args, **kwargs): (1)
L1326 def __mro_entries__(self, bases): (1)
L1358 def __getattr__(self, attr): (1)
L1368 def __setattr__(self, attr, val): (1)
L1374 def __instancecheck__(self, obj): (1)
L1377 def __subclasscheck__(self, cls): (1)
L1381 def __dir__(self): (1)
L1397 class _GenericAlias(_BaseGenericAlias, _root=True): (2)
L1423 def __init__(self, origin, args, *, inst=True, name=None): (1)
L1437 def __eq__(self, other): (1)
L1443 def __hash__(self): (1)
L1446 def __or__(self, right): (1)
L1449 def __ror__(self, left): (1)
L1452 @_tp_cache (2)
L1453 def __getitem__(self, args): (2)
L1483 def _determine_new_args(self, args): (1)
L1512 def _make_substitution(self, args, new_arg_by_param): (1)
L1574 def copy_with(self, args): (1)
L1577 def __repr__(self): (1)
L1589 def __reduce__(self): (1)
L1599 def __mro_entries__(self, bases): (1)
L1614 def __iter__(self): (1)
L1622 class _SpecialGenericAlias(_NotIterable, _BaseGenericAlias, _root=True): (2)
L1623 def __init__(self, origin, nparams, *, inst=True, name=None, defaults=()): (1)
L1634 @_tp_cache (2)
L1635 def __getitem__(self, params): (2)
L1658 def copy_with(self, params): (1)
L1662 def __repr__(self): (1)
L1665 def __subclasscheck__(self, cls): (1)
L1672 def __reduce__(self): (1)
L1675 def __or__(self, right): (1)
L1678 def __ror__(self, left): (1)
L1682 class _DeprecatedGenericAlias(_SpecialGenericAlias, _root=True): (2)
L1684 self, origin, nparams, *, removal_version, inst=True, name=None (1)
L1683 def __init__( (1)
L1689 def __instancecheck__(self, inst): (1)
L1697 class _CallableGenericAlias(_NotIterable, _GenericAlias, _root=True): (2)
L1698 def __repr__(self): (1)
L1707 def __reduce__(self): (1)
L1714 class _CallableType(_SpecialGenericAlias, _root=True): (2)
L1715 def copy_with(self, params): (1)
L1719 def __getitem__(self, params): (1)
L1733 @_tp_cache (2)
L1734 def __getitem_inner__(self, params): (2)
L1747 class _TupleType(_SpecialGenericAlias, _root=True): (2)
L1748 @_tp_cache (2)
L1749 def __getitem__(self, params): (2)
L1761 class _UnionGenericAlias(_NotIterable, _GenericAlias, _root=True): (2)
L1762 def copy_with(self, params): (1)
L1765 def __eq__(self, other): (1)
L1773 def __hash__(self): (1)
L1776 def __repr__(self): (1)
L1785 def __instancecheck__(self, obj): (1)
L1791 def __subclasscheck__(self, cls): (1)
L1797 def __reduce__(self): (1)
L1802 def _value_and_type_iter(parameters): (1)
L1806 class _LiteralGenericAlias(_GenericAlias, _root=True): (2)
L1807 def __eq__(self, other): (1)
L1813 def __hash__(self): (1)
L1817 class _ConcatenateGenericAlias(_GenericAlias, _root=True): (2)
L1818 def copy_with(self, params): (1)
L1826 @_SpecialForm (2)
L1827 def Unpack(self, parameters): (2)
L1877 class _UnpackGenericAlias(_GenericAlias, _root=True): (2)
L1878 def __repr__(self): (1)
L1883 def __getitem__(self, args): (1)
L1888 @property (2)
L1889 def __typing_unpacked_tuple_args__(self): (2)
L1899 @property (2)
L1900 def __typing_is_unpacked_typevartuple__(self): (2)
L1906 class _TypingEllipsis: (2)
L1907 """Internal placeholder for ... (ellipsis).""" (1)
L1910 _TYPING_INTERNALS = frozenset({ (1)
L1916 _SPECIAL_NAMES = frozenset({ (1)
L1924 EXCLUDED_ATTRIBUTES = _TYPING_INTERNALS | _SPECIAL_NAMES | {'_MutableMapping__marker'} (1)
L1927 def _get_protocol_attrs(cls): (1)
L1944 def _no_init_or_replace_init(self, *args, **kwargs): (1)
L1973 def _caller(depth=1, default='__main__'): (1)
L1984 def _allow_reckless_class_checks(depth=2): (1)
L1994 'collections.abc': [ (1)
L1999 'contextlib': ['AbstractContextManager', 'AbstractAsyncContextManager'], (1)
L1993 _PROTO_ALLOWLIST = { (1)
L2003 @functools.cache (2)
functools.py (1)
L679 return lru_cache(maxsize=None)(user_function) (1)
L530 if isinstance(maxsize, int): (1)
L534 elif callable(maxsize) and isinstance(typed, bool): (1)
L540 elif maxsize is not None: (1)
L544 def decorating_function(user_function): (1)
L549 return decorating_function (1)
L545 wrapper = _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo) (1)
L546 wrapper.cache_parameters = lambda : {'maxsize': maxsize, 'typed': typed} (1)
L547 return update_wrapper(wrapper, user_function) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L2004 def _lazy_load_getattr_static(): (2)
L2011 _cleanups.append(_lazy_load_getattr_static.cache_clear) (1)
L2013 def _pickle_psargs(psargs): (1)
L2016 copyreg.pickle(ParamSpecArgs, _pickle_psargs) (1)
copyreg.py (1)
L13 if not callable(pickle_function): (1)
L15 dispatch_table[ob_type] = pickle_function (1)
L19 if constructor_ob is not None: (1)
L2018 def _pickle_pskwargs(pskwargs): (1)
L2021 copyreg.pickle(ParamSpecKwargs, _pickle_pskwargs) (1)
copyreg.py (1)
L13 if not callable(pickle_function): (1)
L15 dispatch_table[ob_type] = pickle_function (1)
L19 if constructor_ob is not None: (1)
L2023 del _pickle_psargs, _pickle_pskwargs (1)
L2030 _abc_instancecheck = ABCMeta.__instancecheck__ (1)
L2031 _abc_subclasscheck = ABCMeta.__subclasscheck__ (1)
L2034 def _type_check_issubclass_arg_1(arg): (1)
L2051 class _ProtocolMeta(ABCMeta): (2)
L2054 def __new__(mcls, name, bases, namespace, /, **kwargs): (1)
L2073 def __init__(cls, *args, **kwargs): (1)
L2078 def __subclasscheck__(cls, other): (1)
L2104 def __instancecheck__(cls, instance): (1)
L2138 @classmethod (2)
L2139 def _proto_hook(cls, other): (2)
L2162 class Protocol(Generic, metaclass=_ProtocolMeta): (2)
L2163 """Base class for protocol classes. (1)
L2195 __slots__ = () (1)
L2196 _is_protocol = True (1)
L2197 _is_runtime_protocol = False (1)
L2199 def __init_subclass__(cls, *args, **kwargs): (1)
L2055 if name == "Protocol" and bases == (Generic,): (1)
L2056 pass (1)
L2071 return super().__new__(mcls, name, bases, namespace, **kwargs) (1)
<frozen abc> (1)
L106 (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
_linalg.py (1)
L24 from numpy._utils import set_module (1)
_linalg.py (1)
L38 from numpy.lib.array_utils import normalize_axis_index, normalize_axis_tuple (1)
L39 from numpy.linalg import _umath_linalg (1)
_function_base_impl.py (1)
L35 array_function_dispatch = functools.partial( (2)
L36 overrides.array_function_dispatch, module='numpy') (1)
L39 __all__ = [ (1)
L66 _QuantileMethods = dict( (2)
L69 inverted_cdf=dict( (2)
L70 get_virtual_index=lambda n, quantiles: _inverted_cdf(n, quantiles), (1)
L71 fix_gamma=None, # should never be called (1)
L73 averaged_inverted_cdf=dict( (2)
L74 get_virtual_index=lambda n, quantiles: (n * quantiles) - 1, (1)
L75 fix_gamma=lambda gamma, _: _get_gamma_mask( (1)
L81 closest_observation=dict( (2)
L82 get_virtual_index=lambda n, quantiles: _closest_observation(n, (1)
L84 fix_gamma=None, # should never be called (1)
L87 interpolated_inverted_cdf=dict( (2)
L88 get_virtual_index=lambda n, quantiles: (1)
L90 fix_gamma=lambda gamma, _: gamma, (1)
L92 hazen=dict( (2)
L93 get_virtual_index=lambda n, quantiles: (1)
L95 fix_gamma=lambda gamma, _: gamma, (1)
L97 weibull=dict( (2)
L98 get_virtual_index=lambda n, quantiles: (1)
L100 fix_gamma=lambda gamma, _: gamma, (1)
L106 linear=dict( (2)
L107 get_virtual_index=lambda n, quantiles: (n - 1) * quantiles, (1)
L108 fix_gamma=lambda gamma, _: gamma, (1)
L110 median_unbiased=dict( (2)
L111 get_virtual_index=lambda n, quantiles: (1)
L113 fix_gamma=lambda gamma, _: gamma, (1)
L115 normal_unbiased=dict( (2)
L116 get_virtual_index=lambda n, quantiles: (1)
L118 fix_gamma=lambda gamma, _: gamma, (1)
L121 lower=dict( (2)
L122 get_virtual_index=lambda n, quantiles: np.floor( (1)
L124 fix_gamma=None, # should never be called, index dtype is int (1)
L126 higher=dict( (2)
L127 get_virtual_index=lambda n, quantiles: np.ceil( (1)
L129 fix_gamma=None, # should never be called, index dtype is int (1)
L131 midpoint=dict( (2)
L132 get_virtual_index=lambda n, quantiles: 0.5 * ( (1)
L135 fix_gamma=lambda gamma, index: _get_gamma_mask( (1)
L141 nearest=dict( (2)
L142 get_virtual_index=lambda n, quantiles: np.around( (1)
L144 fix_gamma=None, (1)
L149 def _rot90_dispatcher(m, k=None, axes=None): (1)
L153 @array_function_dispatch(_rot90_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L154 def rot90(m, k=1, axes=(0, 1)): (2)
L244 def _flip_dispatcher(m, axis=None): (1)
L248 @array_function_dispatch(_flip_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L249 def flip(m, axis=None): (2)
L339 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L340 def iterable(y): (2)
L385 def _weights_are_valid(weights, a, axis): (1)
L410 def _average_dispatcher(a, axis=None, weights=None, returned=None, *, (2)
L411 keepdims=None): (1)
L415 @array_function_dispatch(_average_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L416 def average(a, axis=None, weights=None, returned=False, *, (3)
L417 keepdims=np._NoValue): (1)
L579 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L580 def asarray_chkfinite(a, dtype=None, order=None): (2)
L651 def _piecewise_dispatcher(x, condlist, funclist, *args, **kw): (1)
L658 @array_function_dispatch(_piecewise_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L659 def piecewise(x, condlist, funclist, *args, **kw): (2)
L781 def _select_dispatcher(condlist, choicelist, default=None): (1)
L786 @array_function_dispatch(_select_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L787 def select(condlist, choicelist, default=0): (2)
L894 def _copy_dispatcher(a, order=None, subok=None): (1)
L898 @array_function_dispatch(_copy_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L899 def copy(a, order='K', subok=False): (2)
L971 def _gradient_dispatcher(f, *varargs, axis=None, edge_order=None): (1)
L976 @array_function_dispatch(_gradient_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L977 def gradient(f, *varargs, axis=None, edge_order=1): (2)
L1365 def _diff_dispatcher(a, n=None, axis=None, prepend=None, append=None): (1)
L1369 @array_function_dispatch(_diff_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1370 def diff(a, n=1, axis=-1, prepend=np._NoValue, append=np._NoValue): (2)
L1501 def _interp_dispatcher(x, xp, fp, left=None, right=None, period=None): (1)
L1505 @array_function_dispatch(_interp_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1506 def interp(x, xp, fp, left=None, right=None, period=None): (2)
L1645 def _angle_dispatcher(z, deg=None): (1)
L1649 @array_function_dispatch(_angle_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1650 def angle(z, deg=False): (2)
L1703 def _unwrap_dispatcher(p, discont=None, axis=None, *, period=None): (1)
L1707 @array_function_dispatch(_unwrap_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1708 def unwrap(p, discont=None, axis=-1, *, period=2*pi): (2)
L1804 def _sort_complex(a): (1)
L1808 @array_function_dispatch(_sort_complex) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1809 def sort_complex(a): (2)
L1846 def _arg_trim_zeros(filt): (1)
L1885 def _trim_zeros(filt, trim=None, axis=None): (1)
L1889 @array_function_dispatch(_trim_zeros) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1890 def trim_zeros(filt, trim='fb', axis=None): (2)
L1986 def _extract_dispatcher(condition, arr): (1)
L1990 @array_function_dispatch(_extract_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1991 def extract(condition, arr): (2)
L2043 def _place_dispatcher(arr, mask, vals): (1)
L2047 @array_function_dispatch(_place_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2048 def place(arr, mask, vals): (2)
L2088 def disp(mesg, device=None, linefeed=True): (1)
L2146 _DIMENSION_NAME = r'\w+' (1)
L2147 _CORE_DIMENSION_LIST = '(?:{0:}(?:,{0:})*)?'.format(_DIMENSION_NAME) (1)
L2148 _ARGUMENT = r'\({}\)'.format(_CORE_DIMENSION_LIST) (1)
L2149 _ARGUMENT_LIST = '{0:}(?:,{0:})*'.format(_ARGUMENT) (1)
L2150 _SIGNATURE = '^{0:}->{0:}$'.format(_ARGUMENT_LIST) (1)
L2153 def _parse_gufunc_signature(signature): (1)
L2178 def _update_dim_sizes(dim_sizes, arg, core_dims): (1)
L2212 def _parse_input_dimensions(args, input_core_dims): (1)
L2243 def _calculate_shapes(broadcast_shape, dim_sizes, list_of_core_dims): (1)
L2250 results=None): (1)
L2249 def _create_arrays(broadcast_shape, dim_sizes, list_of_core_dims, dtypes, (1)
L2265 def _get_vectorize_dtype(dtype): (1)
L2271 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L2272 class vectorize: (2)
L2273 """ (1)
L2435 def __init__(self, pyfunc=np._NoValue, otypes=None, doc=None, (2)
L2436 excluded=None, cache=False, signature=None): (1)
L2479 def _init_stage_2(self, pyfunc, *args, **kwargs): (1)
L2487 def _call_as_normal(self, *args, **kwargs): (1)
L2517 def __call__(self, *args, **kwargs): (1)
L2524 def _get_ufunc_and_otypes(self, func, args): (1)
L2593 def _vectorize_call(self, func, args): (1)
L2614 def _vectorize_call_with_signature(self, func, args): (1)
L2675 def _cov_dispatcher(m, y=None, rowvar=None, bias=None, ddof=None, (3)
L2676 fweights=None, aweights=None, *, dtype=None): (2)
L2680 @array_function_dispatch(_cov_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2681 def cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None, (4)
L2682 aweights=None, *, dtype=None): (2)
L2898 def _corrcoef_dispatcher(x, y=None, rowvar=None, bias=None, ddof=None, *, (2)
L2899 dtype=None): (1)
L2903 @array_function_dispatch(_corrcoef_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2904 def corrcoef(x, y=None, rowvar=True, bias=np._NoValue, ddof=np._NoValue, *, (3)
L2905 dtype=None): (1)
L3058 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L3059 def blackman(M): (2)
L3158 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L3159 def bartlett(M): (2)
L3265 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L3266 def hanning(M): (2)
L3367 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L3368 def hamming(M): (2)
L3468 _i0A = [ (1)
L3501 _i0B = [ (1)
L3530 def _chbevl(x, vals): (1)
L3542 def _i0_1(x): (1)
L3546 def _i0_2(x): (1)
L3550 def _i0_dispatcher(x): (1)
L3554 @array_function_dispatch(_i0_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3555 def i0(x): (2)
L3617 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L3618 def kaiser(M, beta): (2)
L3748 def _sinc_dispatcher(x): (1)
L3752 @array_function_dispatch(_sinc_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3753 def sinc(x): (2)
L3834 def _ureduce(a, func, keepdims=False, **kwargs): (1)
L3912 a, axis=None, out=None, overwrite_input=None, keepdims=None): (1)
L3911 def _median_dispatcher( (1)
L3916 @array_function_dispatch(_median_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3917 def median(a, axis=None, out=None, overwrite_input=False, keepdims=False): (2)
L4005 def _median(a, axis=None, out=None, overwrite_input=False): (1)
L4061 def _percentile_dispatcher(a, q, axis=None, out=None, overwrite_input=None, (3)
L4062 method=None, keepdims=None, *, weights=None, (2)
L4063 interpolation=None): (1)
L4067 @array_function_dispatch(_percentile_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L4070 axis=None, (1)
L4071 out=None, (1)
L4072 overwrite_input=False, (1)
L4073 method="linear", (1)
L4074 keepdims=False, (1)
L4068 def percentile(a, (3)
L4076 weights=None, (1)
L4077 interpolation=None): (1)
L4277 def _quantile_dispatcher(a, q, axis=None, out=None, overwrite_input=None, (3)
L4278 method=None, keepdims=None, *, weights=None, (2)
L4279 interpolation=None): (1)
L4283 @array_function_dispatch(_quantile_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L4286 axis=None, (1)
L4287 out=None, (1)
L4288 overwrite_input=False, (1)
L4289 method="linear", (1)
L4290 keepdims=False, (1)
L4284 def quantile(a, (3)
L4292 weights=None, (1)
L4293 interpolation=None): (1)
L4543 axis=None, (1)
L4544 out=None, (1)
L4545 overwrite_input=False, (1)
L4546 method="linear", (1)
L4547 keepdims=False, (1)
L4548 weights=None): (1)
L4541 def _quantile_unchecked(a, (1)
L4561 def _quantile_is_valid(q): (1)
L4573 def _check_interpolation_as_method(method, interpolation, fname): (1)
L4590 def _compute_virtual_index(n, quantiles, alpha: float, beta: float): (1)
L4615 def _get_gamma(virtual_indexes, previous_indexes, method): (1)
L4639 def _lerp(a, b, t, out=None): (1)
L4663 def _get_gamma_mask(shape, default_value, conditioned_value, where): (1)
L4669 def _discrete_interpolation_to_boundaries(index, gamma_condition_fun): (1)
L4683 def _closest_observation(n, quantiles): (1)
L4691 def _inverted_cdf(n, quantiles): (1)
L4701 axis: int | None = None, (2)
L4702 out=None, (1)
L4703 overwrite_input: bool = False, (2)
L4704 method="linear", (1)
L4697 def _quantile_ureduce_func( (7)
L4698 a: np.array, (1)
L4699 q: np.array, (1)
L4700 weights: np.array, (1)
L4705 ) -> np.array: (1)
L4736 def _get_indexes(arr, virtual_indexes, valid_values_count): (1)
L4774 axis: int = -1, (2)
L4775 method="linear", (1)
L4776 out=None, (1)
L4777 weights=None, (1)
L4771 def _quantile( (4)
L4772 arr: np.array, (1)
L4773 quantiles: np.array, (1)
L4955 def _trapezoid_dispatcher(y, x=None, dx=None, axis=None): (1)
L4959 @array_function_dispatch(_trapezoid_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L4960 def trapezoid(y, x=None, dx=1.0, axis=-1): (2)
L5094 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L5095 def trapz(y, x=None, dx=1.0, axis=-1): (2)
L5112 def _meshgrid_dispatcher(*xi, copy=None, sparse=None, indexing=None): (1)
L5117 @array_function_dispatch(_meshgrid_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L5118 def meshgrid(*xi, copy=True, sparse=False, indexing='xy'): (2)
L5268 def _delete_dispatcher(arr, obj, axis=None): (1)
L5272 @array_function_dispatch(_delete_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L5273 def delete(arr, obj, axis=None): (2)
L5452 def _insert_dispatcher(arr, obj, values, axis=None): (1)
L5456 @array_function_dispatch(_insert_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L5457 def insert(arr, obj, values, axis=None): (2)
L5640 def _append_dispatcher(arr, values, axis=None): (1)
L5644 @array_function_dispatch(_append_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L5645 def append(arr, values, axis=None): (2)
L5714 def _digitize_dispatcher(x, bins, right=None): (1)
L5718 @array_function_dispatch(_digitize_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L5719 def digitize(x, bins, right=False): (2)
_index_tricks_impl.py (1)
L19 array_function_dispatch = functools.partial( (2)
L20 overrides.array_function_dispatch, module='numpy') (1)
L23 __all__ = [ (1)
L30 def _ix__dispatcher(*args): (1)
L34 @array_function_dispatch(_ix__dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L35 def ix_(*args): (2)
L110 class nd_grid: (2)
L111 """ (1)
L144 __slots__ = ('sparse',) (1)
L146 def __init__(self, sparse=False): (1)
L149 def __getitem__(self, key): (1)
L214 class MGridClass(nd_grid): (2)
L215 """ (1)
L267 __slots__ = () (1)
L269 def __init__(self): (1)
L273 mgrid = MGridClass() (1)
L270 super().__init__(sparse=False) (1)
L147 self.sparse = sparse (2)
L276 class OGridClass(nd_grid): (2)
L277 """ (1)
L319 __slots__ = () (1)
L321 def __init__(self): (1)
L325 ogrid = OGridClass() (1)
L322 super().__init__(sparse=True) (1)
L328 class AxisConcatenator: (2)
L329 """ (1)
L334 __slots__ = ('axis', 'matrix', 'trans1d', 'ndmin') (1)
L337 concatenate = staticmethod(_nx.concatenate) (1)
L338 makemat = staticmethod(matrixlib.matrix) (1)
L340 def __init__(self, axis=0, matrix=False, ndmin=1, trans1d=-1): (1)
L346 def __getitem__(self, key): (1)
L447 def __len__(self): (1)
L455 class RClass(AxisConcatenator): (2)
L456 """ (1)
L550 __slots__ = () (1)
L552 def __init__(self): (1)
L556 r_ = RClass() (1)
L553 AxisConcatenator.__init__(self, 0) (1)
L341 self.axis = axis (2)
L342 self.matrix = matrix (2)
L343 self.trans1d = trans1d (2)
L344 self.ndmin = ndmin (2)
L559 class CClass(AxisConcatenator): (2)
L560 """ (1)
L584 __slots__ = () (1)
L586 def __init__(self): (1)
L590 c_ = CClass() (1)
L587 AxisConcatenator.__init__(self, -1, ndmin=2, trans1d=0) (1)
L593 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L594 class ndenumerate: (2)
L595 """ (1)
L622 def __init__(self, arr): (1)
L625 def __next__(self): (1)
L639 def __iter__(self): (1)
L643 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L644 class ndindex: (2)
L645 """ (1)
L690 def __init__(self, *shape): (1)
L698 def __iter__(self): (1)
L701 def ndincr(self): (1)
L717 def __next__(self): (1)
L744 class IndexExpression: (2)
L745 """ (1)
L789 __slots__ = ('maketuple',) (1)
L791 def __init__(self, maketuple): (1)
L794 def __getitem__(self, item): (1)
L801 index_exp = IndexExpression(maketuple=True) (1)
L792 self.maketuple = maketuple (2)
L802 s_ = IndexExpression(maketuple=False) (1)
L811 def _fill_diagonal_dispatcher(a, val, wrap=None): (1)
L815 @array_function_dispatch(_fill_diagonal_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L816 def fill_diagonal(a, val, wrap=False): (2)
L947 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L948 def diag_indices(n, ndim=2): (2)
L1014 def _diag_indices_from(arr): (1)
L1018 @array_function_dispatch(_diag_indices_from) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1019 def diag_indices_from(arr): (2)
L1400 (826)
L1401 (621)
L1408 (621)
L1412 (621)
L1424 (205)
_globals.py (1)
L22 __all__ = ['_NoValue', '_CopyMode'] (1)
L27 if '_is_loaded' in globals(): (1)
L29 _is_loaded = True (1)
L32 class _NoValueType: (2)
L33 """Special keyword value. (1)
L51 __instance = None (1)
L52 def __new__(cls): (1)
L58 def __repr__(self): (1)
L62 _NoValue = _NoValueType() (1)
L54 if not cls.__instance: (1)
L55 cls.__instance = super().__new__(cls) (1)
L56 return cls.__instance (1)
L65 @_set_module("numpy") (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
enum.py (1)
L837 member_map = cls.__dict__.get('_member_map_', {}) (1)
L838 if name in member_map: (1)
L840 super().__setattr__(name, value) (1)
L30 return func (1)
enum.py (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (3)
L78 def _is_private(cls_name, name): (3)
L80 pattern = '_%s__' % (cls_name, ) (3)
L81 pat_len = len(pattern) (3)
L83 len(name) > pat_len (3)
L89 return False (3)
L366 elif _is_sunder(key): (3)
L63 len(name) > 2 and (9)
L64 name[0] == name[-1] == '_' and (3)
L65 name[1] != '_' and (3)
L62 return ( (3)
L398 elif _is_dunder(key): (3)
L52 len(name) > 4 and (9)
L53 name[:2] == name[-2:] == '__' and (3)
L54 name[2] != '_' and (3)
L55 name[-3] != '_' (3)
L51 return ( (3)
L399 if key == '__order__': (3)
L460 super().__setitem__(key, value) (3)
L84 and name.startswith(pattern) (1)
L66 class _CopyMode(enum.Enum): (2)
enum.py (1)
L487 metacls._check_for_existing_members_(cls, bases) (1)
L938 for chain in bases: (2)
L939 for base in chain.__mro__: (3)
L940 if isinstance(base, EnumType) and base._member_names_: (2)
L489 enum_dict = EnumDict(cls) (1)
L347 super().__init__() (1)
L348 self._member_names = {} # use a dict -- faster look-up than a list, and keeps insertion order since 3.7 (1)
L349 self._last_values = [] (1)
L350 self._ignore = [] (1)
L351 self._auto_called = False (1)
L352 self._cls_name = cls_name (1)
L491 member_type, first_enum = metacls._get_mixins_(cls, bases) (1)
L954 if not bases: (1)
L958 first_enum = bases[-1] (1)
L959 if not isinstance(first_enum, EnumType): (1)
L962 member_type = mcls._find_data_type_(class_name, bases) or object (1)
L990 data_types = set() (1)
L991 base_chain = set() (1)
L992 for chain in bases: (2)
L993 candidate = None (1)
L994 for base in chain.__mro__: (3)
L995 base_chain.add(base) (2)
L996 if base is object: (2)
L998 elif isinstance(base, EnumType): (1)
L999 if base._member_type_ is not object: (1)
L997 continue (1)
L1007 if len(data_types) > 1: (1)
L1009 elif data_types: (1)
L1012 return None (1)
L963 return member_type, first_enum (1)
L492 if first_enum is not None: (1)
L493 enum_dict['_generate_next_value_'] = getattr( (2)
L494 first_enum, '_generate_next_value_', None, (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (1)
L78 def _is_private(cls_name, name): (1)
L80 pattern = '_%s__' % (cls_name, ) (1)
L81 pat_len = len(pattern) (1)
L83 len(name) > pat_len (1)
L84 and name.startswith(pattern) (1)
L89 return False (1)
L366 elif _is_sunder(key): (1)
L63 len(name) > 2 and (3)
L64 name[0] == name[-1] == '_' and (1)
L65 name[1] != '_' and (1)
L66 name[-2] != '_' (1)
L62 return ( (1)
L367 if key not in ( (1)
L380 if key == '_generate_next_value_': (1)
L382 if self._auto_called: (1)
L384 _gnv = value.__func__ if isinstance(value, staticmethod) else value (1)
L385 setattr(self, '_generate_next_value', _gnv) (1)
L460 super().__setitem__(key, value) (1)
L496 return enum_dict (1)
L67 """ (1)
enum.py (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (1)
L78 def _is_private(cls_name, name): (1)
L80 pattern = '_%s__' % (cls_name, ) (1)
L81 pat_len = len(pattern) (1)
L83 len(name) > pat_len (1)
L89 return False (1)
L366 elif _is_sunder(key): (1)
L63 len(name) > 2 and (3)
L64 name[0] == name[-1] == '_' and (1)
L65 name[1] != '_' and (1)
L62 return ( (1)
L398 elif _is_dunder(key): (1)
L52 len(name) > 4 and (3)
L53 name[:2] == name[-2:] == '__' and (1)
L54 name[2] != '_' and (1)
L55 name[-3] != '_' (1)
L51 return ( (1)
L399 if key == '__order__': (1)
L460 super().__setitem__(key, value) (1)
L83 ALWAYS = True (1)
enum.py (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (1)
L78 def _is_private(cls_name, name): (1)
L80 pattern = '_%s__' % (cls_name, ) (1)
L81 pat_len = len(pattern) (1)
L83 len(name) > pat_len (1)
L89 return False (1)
L366 elif _is_sunder(key): (1)
L63 len(name) > 2 and (2)
L64 name[0] == name[-1] == '_' and (1)
L62 return ( (1)
L398 elif _is_dunder(key): (1)
L52 len(name) > 4 and (2)
L53 name[:2] == name[-2:] == '__' and (1)
L51 return ( (1)
L401 elif key in self._member_names: (1)
L404 elif key in self._ignore: (1)
L406 elif isinstance(value, nonmember): (1)
L409 elif isinstance(value, partial): (1)
L415 elif _is_descriptor(value): (1)
L41 return not isinstance(obj, partial) and ( (2)
L42 hasattr(obj, '__get__') or (2)
L43 hasattr(obj, '__set__') or (1)
L44 hasattr(obj, '__delete__') (1)
L417 elif self._cls_name is not None and _is_internal_class(self._cls_name, value): (1)
L71 if not isinstance(obj, type): (1)
L72 return False (1)
L421 if key in self: (1)
L424 elif isinstance(value, member): (1)
L427 non_auto_store = True (1)
L428 single = False (1)
L429 if isinstance(value, auto): (1)
L432 if isinstance(value, tuple) and any(isinstance(v, auto) for v in value): (1)
L457 self._member_names[key] = None (1)
L458 if non_auto_store: (1)
L459 self._last_values.append(value) (1)
L460 super().__setitem__(key, value) (1)
L84 NEVER = False (1)
enum.py (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (1)
L78 def _is_private(cls_name, name): (1)
L80 pattern = '_%s__' % (cls_name, ) (1)
L81 pat_len = len(pattern) (1)
L83 len(name) > pat_len (1)
L89 return False (1)
L366 elif _is_sunder(key): (1)
L63 len(name) > 2 and (2)
L64 name[0] == name[-1] == '_' and (1)
L62 return ( (1)
L398 elif _is_dunder(key): (1)
L52 len(name) > 4 and (2)
L53 name[:2] == name[-2:] == '__' and (1)
L51 return ( (1)
L401 elif key in self._member_names: (1)
L404 elif key in self._ignore: (1)
L406 elif isinstance(value, nonmember): (1)
L409 elif isinstance(value, partial): (1)
L415 elif _is_descriptor(value): (1)
L41 return not isinstance(obj, partial) and ( (2)
L42 hasattr(obj, '__get__') or (2)
L43 hasattr(obj, '__set__') or (1)
L44 hasattr(obj, '__delete__') (1)
L417 elif self._cls_name is not None and _is_internal_class(self._cls_name, value): (1)
L71 if not isinstance(obj, type): (1)
L72 return False (1)
L421 if key in self: (1)
L424 elif isinstance(value, member): (1)
L427 non_auto_store = True (1)
L428 single = False (1)
L429 if isinstance(value, auto): (1)
L432 if isinstance(value, tuple) and any(isinstance(v, auto) for v in value): (1)
L457 self._member_names[key] = None (1)
L458 if non_auto_store: (1)
L459 self._last_values.append(value) (1)
L460 super().__setitem__(key, value) (1)
L85 IF_NEEDED = 2 (1)
enum.py (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (1)
L78 def _is_private(cls_name, name): (1)
L80 pattern = '_%s__' % (cls_name, ) (1)
L81 pat_len = len(pattern) (1)
L83 len(name) > pat_len (1)
L89 return False (1)
L366 elif _is_sunder(key): (1)
L63 len(name) > 2 and (2)
L64 name[0] == name[-1] == '_' and (1)
L62 return ( (1)
L398 elif _is_dunder(key): (1)
L52 len(name) > 4 and (2)
L53 name[:2] == name[-2:] == '__' and (1)
L51 return ( (1)
L401 elif key in self._member_names: (1)
L404 elif key in self._ignore: (1)
L406 elif isinstance(value, nonmember): (1)
L409 elif isinstance(value, partial): (1)
L415 elif _is_descriptor(value): (1)
L41 return not isinstance(obj, partial) and ( (2)
L42 hasattr(obj, '__get__') or (2)
L43 hasattr(obj, '__set__') or (1)
L44 hasattr(obj, '__delete__') (1)
L417 elif self._cls_name is not None and _is_internal_class(self._cls_name, value): (1)
L71 if not isinstance(obj, type): (1)
L72 return False (1)
L421 if key in self: (1)
L424 elif isinstance(value, member): (1)
L427 non_auto_store = True (1)
L428 single = False (1)
L429 if isinstance(value, auto): (1)
L432 if isinstance(value, tuple) and any(isinstance(v, auto) for v in value): (1)
L457 self._member_names[key] = None (1)
L458 if non_auto_store: (1)
L459 self._last_values.append(value) (1)
L460 super().__setitem__(key, value) (1)
L87 def __bool__(self): (1)
enum.py (1)
L363 if self._cls_name is not None and _is_private(self._cls_name, key): (2)
L78 def _is_private(cls_name, name): (2)
L80 pattern = '_%s__' % (cls_name, ) (2)
L81 pat_len = len(pattern) (2)
L83 len(name) > pat_len (2)
L89 return False (2)
L366 elif _is_sunder(key): (2)
L63 len(name) > 2 and (6)
L64 name[0] == name[-1] == '_' and (2)
L65 name[1] != '_' and (2)
L62 return ( (2)
L398 elif _is_dunder(key): (2)
L52 len(name) > 4 and (6)
L53 name[:2] == name[-2:] == '__' and (2)
L54 name[2] != '_' and (2)
L55 name[-3] != '_' (2)
L51 return ( (2)
L399 if key == '__order__': (2)
L460 super().__setitem__(key, value) (2)
L84 and name.startswith(pattern) (1)
L504 if _simple: (1)
L508 classdict.setdefault('_ignore_', []).append('_ignore_') (1)
L509 ignore = classdict['_ignore_'] (1)
L510 for key in ignore: (2)
L511 classdict.pop(key, None) (1)
L514 member_names = classdict._member_names (1)
L517 invalid_names = set(member_names) & {'mro', ''} (1)
L518 if invalid_names: (1)
L524 _order_ = classdict.pop('_order_', None) (1)
L525 _gnv = classdict.get('_generate_next_value_') (1)
L526 if _gnv is not None and type(_gnv) is not staticmethod: (1)
L527 _gnv = staticmethod(_gnv) (1)
L529 classdict = dict(classdict.items()) (1)
L530 if _gnv is not None: (1)
L531 classdict['_generate_next_value_'] = _gnv (1)
L534 member_type, first_enum = metacls._get_mixins_(cls, bases) (1)
L954 if not bases: (1)
L958 first_enum = bases[-1] (1)
L959 if not isinstance(first_enum, EnumType): (1)
L962 member_type = mcls._find_data_type_(class_name, bases) or object (1)
L990 data_types = set() (1)
L991 base_chain = set() (1)
L992 for chain in bases: (2)
L993 candidate = None (1)
L994 for base in chain.__mro__: (3)
L995 base_chain.add(base) (2)
L996 if base is object: (2)
L998 elif isinstance(base, EnumType): (1)
L999 if base._member_type_ is not object: (1)
L997 continue (1)
L1007 if len(data_types) > 1: (1)
L1009 elif data_types: (1)
L1012 return None (1)
L963 return member_type, first_enum (1)
L535 __new__, save_new, use_args = metacls._find_new_( (2)
L536 classdict, member_type, first_enum, (1)
L1026 __new__ = classdict.get('__new__', None) (1)
L1029 save_new = first_enum is not None and __new__ is not None (1)
L1031 if __new__ is None: (1)
L1034 for method in ('__new_member__', '__new__'): (3)
L1035 for possible in (member_type, first_enum): (6)
L1036 target = getattr(possible, method, None) (4)
L1037 if target not in { (8)
L1038 None, (4)
L1039 None.__new__, (4)
L1040 object.__new__, (4)
L1041 Enum.__new__, (4)
L1045 if __new__ is not None: (2)
L1048 __new__ = object.__new__ (1)
L1053 if first_enum is None or __new__ in (Enum.__new__, object.__new__): (1)
L1054 use_args = False (1)
L1057 return __new__, save_new, use_args (1)
L538 classdict['_new_member_'] = __new__ (1)
L539 classdict['_use_args_'] = use_args (1)
L542 for name in member_names: (4)
L543 value = classdict[name] (3)
L544 classdict[name] = _proto_member(value) (3)
L249 self.value = value (3)
L547 classdict['_member_names_'] = [] (1)
L548 classdict['_member_map_'] = {} (1)
L549 classdict['_value2member_map_'] = {} (1)
L550 classdict['_hashable_values_'] = [] # for comparing with non-hashable types (1)
L551 classdict['_unhashable_values_'] = [] # e.g. frozenset() with set() (1)
L552 classdict['_unhashable_values_map_'] = {} (1)
L553 classdict['_member_type_'] = member_type (1)
L555 classdict['_value_repr_'] = metacls._find_data_repr_(cls, bases) (1)
L967 for chain in bases: (1)
L968 for base in chain.__mro__: (1)
L969 if base is object: (1)
L971 elif isinstance(base, EnumType): (1)
L973 return base._value_repr_ (1)
L559 boundary (1)
L560 or getattr(first_enum, '_boundary_', None) (1)
L558 classdict['_boundary_'] = ( (1)
L562 classdict['_flag_mask_'] = 0 (1)
L563 classdict['_singles_mask_'] = 0 (1)
L564 classdict['_all_bits_'] = 0 (1)
L565 classdict['_inverted_'] = None (1)
L566 try: (1)
L567 classdict['_%s__in_progress' % cls] = True (1)
L568 enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) (1)
L256 delattr(enum_class, member_name) (3)
L767 if attr in cls._member_map_: (9)
L769 super().__delattr__(attr) (9)
L258 value = self.value (3)
L259 if not isinstance(value, tuple): (3)
L260 args = (value, ) (3)
L263 if enum_class._member_type_ is tuple: # special case for tuple enums (3)
L265 if not enum_class._use_args_: (3)
L266 enum_member = enum_class._new_member_(enum_class) (3)
L269 if not hasattr(enum_member, '_value_'): (3)
L270 if enum_class._member_type_ is object: (3)
L271 enum_member._value_ = value (3)
L281 value = enum_member._value_ (3)
L282 enum_member._name_ = member_name (3)
L283 enum_member.__objclass__ = enum_class (3)
L284 enum_member.__init__(*args) (3)
L1218 pass (3)
L285 enum_member._sort_order_ = len(enum_class._member_names_) (3)
L287 if Flag is not None and issubclass(enum_class, Flag): (3)
L296 try: (3)
L297 try: (3)
L299 enum_member = enum_class._value2member_map_[value] (3)
L300 except TypeError: (3)
L307 except KeyError: (3)
L311 Flag is None (3)
L312 or not issubclass(enum_class, Flag) (3)
L315 enum_class._member_names_.append(member_name) (3)
L325 enum_class._add_member_(member_name, enum_member) (3)
L1061 if name in cls._member_map_: (3)
L1067 found_descriptor = None (3)
L1068 descriptor_type = None (3)
L1069 class_type = None (3)
L1070 for base in cls.__mro__[1:]: (9)
L1071 attr = base.__dict__.get(name) (6)
L1072 if attr is not None: (6)
L1086 if found_descriptor: (3)
L1102 setattr(cls, name, member) (3)
L837 member_map = cls.__dict__.get('_member_map_', {}) (4)
L838 if name in member_map: (4)
L840 super().__setattr__(name, value) (4)
L1104 cls._member_map_[name] = member (3)
L326 try: (3)
L330 enum_class._value2member_map_.setdefault(value, enum_member) (3)
L331 if value not in enum_class._hashable_values_: (3)
L332 enum_class._hashable_values_.append(value) (3)
L569 classdict['_%s__in_progress' % cls] = False (1)
L570 delattr(enum_class, '_%s__in_progress' % cls) (1)
L578 classdict.update(enum_class.__dict__) (1)
L586 if ReprEnum is not None and ReprEnum in bases: (1)
L603 for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): (5)
L604 if name not in classdict: (4)
L606 enum_method = getattr(first_enum, name) (4)
L607 found_method = getattr(enum_class, name) (4)
L608 object_method = getattr(object, name) (4)
L609 data_type_method = getattr(member_type, name) (4)
L610 if found_method in (data_type_method, object_method): (4)
L614 if Flag is not None and issubclass(enum_class, Flag): (1)
L627 if Enum is not None: (1)
L630 if save_new: (1)
L632 enum_class.__new__ = Enum.__new__ (1)
L643 if _order_ is not None: (1)
L649 Flag is None and cls != 'Flag' (1)
L650 or Flag is not None and not issubclass(enum_class, Flag) (1)
L652 delattr(enum_class, '_boundary_') (1)
L653 delattr(enum_class, '_flag_mask_') (1)
L654 delattr(enum_class, '_singles_mask_') (1)
L655 delattr(enum_class, '_all_bits_') (1)
L656 delattr(enum_class, '_inverted_') (1)
L670 if _order_: (1)
L687 return enum_class (1)
__init__.py (49)
L111 from .version import __version__ (2)
L126 try: (2)
L127 from numpy.__config__ import show_config (2)
L51 for envkey in env_added: (3)
L52 del os.environ[envkey] (2)
<frozen os> (2)
L727 (2)
L787 (2)
L781 (2)
L783 (2)
L728 (2)
L729 (2)
L730 (2)
L53 del envkey (1)
L54 del env_added (1)
L55 del os (1)
L57 from . import umath (1)
L61 if not (hasattr(multiarray, '_multiarray_umath') and (1)
L62 hasattr(umath, '_multiarray_umath')): (1)
L71 from . import numerictypes as nt (1)
L72 from .numerictypes import sctypes, sctypeDict (1)
L75 from .numeric import * (1)
L77 from .fromnumeric import * (1)
L82 from .function_base import * (1)
L84 from . import getlimits (1)
L85 from .getlimits import * (1)
L87 from .shape_base import * (1)
L89 from .einsumfunc import * (2)
L97 from . import _add_newdocs_scalars (1)
L99 from . import _dtype_ctypes (1)
L100 from . import _internal (1)
L101 from . import _dtype (1)
L102 from . import _methods (1)
L104 acos = numeric.arccos (1)
L105 acosh = numeric.arccosh (1)
L106 asin = numeric.arcsin (1)
L107 asinh = numeric.arcsinh (1)
L108 atan = numeric.arctan (1)
L109 atanh = numeric.arctanh (1)
L110 atan2 = numeric.arctan2 (1)
L112 bitwise_left_shift = numeric.left_shift (1)
L113 bitwise_invert = numeric.invert (1)
L114 bitwise_right_shift = numeric.right_shift (1)
L115 permute_dims = numeric.transpose (1)
L116 pow = numeric.power (1)
L118 __all__ = [ (1)
L123 __all__ += numeric.__all__ (1)
L124 __all__ += function_base.__all__ (1)
L125 __all__ += getlimits.__all__ (1)
L130 def _ufunc_reduce(func): (1)
L139 def _DType_reconstruct(scalar_type): (1)
L146 def _DType_reduce(DType): (1)
L158 def __getattr__(name): (1)
L170 import copyreg (1)
L172 copyreg.pickle(ufunc, _ufunc_reduce) (1)
copyreg.py (1)
L13 if not callable(pickle_function): (1)
L15 dispatch_table[ob_type] = pickle_function (1)
L19 if constructor_ob is not None: (1)
L173 copyreg.pickle(type(dtype), _DType_reduce, _DType_reconstruct) (1)
copyreg.py (1)
L13 if not callable(pickle_function): (1)
L15 dispatch_table[ob_type] = pickle_function (1)
L19 if constructor_ob is not None: (1)
L20 constructor(constructor_ob) (1)
L23 if not callable(object): (1)
L176 del copyreg, _ufunc_reduce, _DType_reduce (1)
L178 from numpy._pytesttester import PytestTester (1)
L135 from ._core import ( (1)
L187 for ta in ["float96", "float128", "complex192", "complex256"]: (5)
L188 try: (4)
L189 globals()[ta] = getattr(_core, ta) (4)
L160 if name == "MachAr": (4)
L167 raise AttributeError(f"Module {__name__!r} has no attribute {name!r}") (4)
L190 except AttributeError: (4)
L191 pass (4)
L192 del ta (1)
L194 from . import lib (1)
L14 from . import introspect (1)
L15 from . import mixins (1)
L16 from . import npyio (1)
L17 from . import scimath (1)
L18 from . import stride_tricks (1)
L22 from . import _type_check_impl (1)
L23 from . import _index_tricks_impl (1)
L88 from . import _linalg (1)
L5 from .defmatrix import * (1)
L24 from . import _nanfunctions_impl (1)
L25 from . import _function_base_impl (1)
L26 from . import _stride_tricks_impl (1)
L27 from . import _shape_base_impl (1)
L28 from . import _twodim_base_impl (1)
L29 from . import _ufunclike_impl (1)
L30 from . import _histograms_impl (1)
L31 from . import _utils_impl (1)
L32 from . import _arraysetops_impl (1)
L33 from . import _polynomial_impl (1)
L34 from . import _npyio_impl (1)
L35 from . import _arrayterator_impl (1)
L36 from . import _arraypad_impl (1)
L37 from . import _version (1)
L40 from ._arrayterator_impl import Arrayterator (1)
L195 from .lib import scimath as emath (1)
L196 from .lib._histograms_impl import ( (1)
L253 from .matrixlib import ( (1)
L261 __numpy_submodules__ = { (1)
L269 "module 'numpy' has no attribute '{n}'.\n" (1)
L268 _msg = ( (1)
L278 "If you specifically wanted the numpy scalar type, use `np.{}` here.") (1)
L277 _specific_msg = ( (1)
L281 "When replacing `np.{}`, you may wish to use e.g. `np.int64` " (1)
L280 _int_extended_msg = ( (1)
L287 ("object", ""), # The NumPy scalar only exists by name. (1)
L288 ("float", _specific_msg.format("float64")), (1)
L289 ("complex", _specific_msg.format("complex128")), (1)
L290 ("str", _specific_msg.format("str_")), (1)
L291 ("int", _int_extended_msg.format("int"))] (1)
L286 _type_info = [ (1)
L295 for n, extended_msg in _type_info (7)
L293 __former_attrs__ = { (2)
L294 n: _msg.format(n=n, extended_msg=extended_msg) (5)
L304 __future_scalars__ = {"str", "bytes", "object"} (1)
L306 __array_api_version__ = "2023.12" (1)
L308 from ._array_api_info import __array_namespace_info__ (1)
overrides.py (1)
L6 from .._utils._inspect import getargspec (1)
_exceptions.py (1)
L10 def _unpack_tuple(tup): (1)
L17 def _display_as_base(cls): (1)
L32 class UFuncTypeError(TypeError): (2)
L33 """ Base class for all ufunc exceptions """ (1)
L34 def __init__(self, ufunc): (1)
L38 @_display_as_base (3)
L39 class _UFuncNoLoopError(UFuncTypeError): (2)
L40 """ Thrown when a ufunc loop cannot be found """ (1)
L41 def __init__(self, ufunc, dtypes): (1)
L45 def __str__(self): (1)
L27 assert issubclass(cls, Exception) (6)
L28 cls.__name__ = cls.__base__.__name__ (6)
L29 return cls (6)
L56 @_display_as_base (3)
L57 class _UFuncBinaryResolutionError(_UFuncNoLoopError): (2)
L58 """ Thrown when a binary resolution fails """ (1)
L59 def __init__(self, ufunc, dtypes): (1)
L63 def __str__(self): (1)
L71 @_display_as_base (3)
L72 class _UFuncCastingError(UFuncTypeError): (2)
L73 def __init__(self, ufunc, casting, from_, to): (1)
L80 @_display_as_base (3)
L81 class _UFuncInputCastingError(_UFuncCastingError): (2)
L82 """ Thrown when a ufunc input cannot be casted """ (1)
L83 def __init__(self, ufunc, casting, from_, to, i): (1)
L87 def __str__(self): (1)
L98 @_display_as_base (3)
L99 class _UFuncOutputCastingError(_UFuncCastingError): (2)
L100 """ Thrown when a ufunc output cannot be casted """ (1)
L101 def __init__(self, ufunc, casting, from_, to, i): (1)
L105 def __str__(self): (1)
L116 @_display_as_base (3)
L117 class _ArrayMemoryError(MemoryError): (2)
L118 """ Thrown when an array cannot be allocated""" (1)
L119 def __init__(self, shape, dtype): (1)
L123 @property (2)
L124 def _total_size(self): (2)
L130 @staticmethod (2)
L131 def _size_to_string(num_bytes): (2)
L167 def __str__(self): (1)
dtypes.py (25)
L35 setattr(dtypes, DType.__name__, DType) (25)
L36 __all__.append(DType.__name__) (25)
L38 if alias: (25)
<frozen importlib._bootstrap_external> (1)
L1323 (2)
L1324 (1)
L33 from numpy import dtypes (24)
L39 alias = alias.removeprefix("numpy.dtypes.") (8)
L40 setattr(dtypes, alias, DType) (8)
L41 __all__.append(alias) (8)
multiarray.py (2)
L11 from . import _multiarray_umath (1)
L12 from ._multiarray_umath import * # noqa: F403 (1)
umath.py (1)
L11 from ._multiarray_umath import * # noqa: F403 (1)
numerictypes.py (2)
L83 from .multiarray import ( (1)
L90 __all__ = [ (1)
L98 from ._string_helpers import ( # noqa: F401 (1)
numeric.py (10)
L12 from . import numerictypes as nt (1)
L13 from .multiarray import ( (1)
L24 from . import umath (1)
L25 from . import shape_base (1)
L26 from .overrides import finalize_array_function_like, set_module (1)
L29 from ..exceptions import AxisError (1)
L2701 from .fromnumeric import * (1)
L2703 from .arrayprint import * (1)
L2705 from ._asarray import * (1)
L2707 from ._ufunc_config import * (1)
shape_base.py (2)
L10 from .multiarray import array, asanyarray, normalize_axis_index (1)
L13 array_function_dispatch = functools.partial( (2)
L14 overrides.array_function_dispatch, module='numpy') (1)
L17 def _atleast_1d_dispatcher(*arys): (1)
L21 @array_function_dispatch(_atleast_1d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L22 def atleast_1d(*arys): (2)
L76 def _atleast_2d_dispatcher(*arys): (1)
L80 @array_function_dispatch(_atleast_2d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L81 def atleast_2d(*arys): (2)
L135 def _atleast_3d_dispatcher(*arys): (1)
L139 @array_function_dispatch(_atleast_3d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L140 def atleast_3d(*arys): (2)
L208 def _arrays_for_stack_dispatcher(arrays): (1)
L216 def _vhstack_dispatcher(tup, *, dtype=None, casting=None): (1)
L220 @array_function_dispatch(_vhstack_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L221 def vstack(tup, *, dtype=None, casting="same_kind"): (2)
L295 @array_function_dispatch(_vhstack_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L296 def hstack(tup, *, dtype=None, casting="same_kind"): (2)
L370 def _stack_dispatcher(arrays, axis=None, out=None, *, (2)
L371 dtype=None, casting=None): (1)
L380 @array_function_dispatch(_stack_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L381 def stack(arrays, axis=0, out=None, *, dtype=None, casting="same_kind"): (2)
L470 def _unstack_dispatcher(x, /, *, axis=None): (1)
L473 @array_function_dispatch(_unstack_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L474 def unstack(x, /, *, axis=0): (2)
L544 _size = getattr(_from_nx.size, '__wrapped__', _from_nx.size) (1)
L545 _ndim = getattr(_from_nx.ndim, '__wrapped__', _from_nx.ndim) (1)
L546 _concatenate = getattr(_from_nx.concatenate, (2)
L547 '__wrapped__', _from_nx.concatenate) (1)
L550 def _block_format_index(index): (1)
L558 def _block_check_depths_match(arrays, parent_index=[]): (1)
L634 def _atleast_nd(a, ndim): (1)
L640 def _accumulate(values): (1)
L644 def _concatenate_shapes(shapes, axis): (1)
L701 def _block_info_recursion(arrays, max_depth, result_ndim, depth=0): (1)
L754 def _block(arrays, max_depth, result_ndim, depth=0): (1)
L773 def _block_dispatcher(arrays): (1)
L784 @array_function_dispatch(_block_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L785 def block(arrays): (2)
L960 def _block_setup(arrays): (1)
L977 def _block_slicing(arrays, list_ndim, result_ndim): (1)
L996 def _block_concatenate(arrays, list_ndim, result_ndim): (1)
fromnumeric.py (6)
L10 from . import multiarray as mu (1)
L11 from . import overrides (1)
L12 from . import umath as um (1)
L13 from . import numerictypes as nt (1)
L14 from .multiarray import asarray, array, asanyarray, concatenate (1)
L18 _dt_ = nt.sctype2char (1)
L21 __all__ = [ (1)
L32 _gentype = types.GeneratorType (1)
L34 _sum_ = sum (1)
L36 array_function_dispatch = functools.partial( (2)
L37 overrides.array_function_dispatch, module='numpy') (1)
L41 def _wrapit(obj, method, *args, **kwds): (1)
L51 def _wrapfunc(obj, method, *args, **kwds): (1)
L69 def _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs): (1)
L89 def _wrapreduction_any_all(obj, ufunc, method, axis, out, **kwargs): (1)
L105 def _take_dispatcher(a, indices, axis=None, out=None, mode=None): (1)
L109 @array_function_dispatch(_take_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L110 def take(a, indices, axis=None, out=None, mode='raise'): (2)
L206 def _reshape_dispatcher(a, /, shape=None, order=None, *, newshape=None, (2)
L207 copy=None): (1)
L211 @array_function_dispatch(_reshape_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L212 def reshape(a, /, shape=None, order='C', *, newshape=None, copy=None): (2)
L327 def _choose_dispatcher(a, choices, out=None, mode=None): (1)
L333 @array_function_dispatch(_choose_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L334 def choose(a, choices, out=None, mode='raise'): (2)
L458 def _repeat_dispatcher(a, repeats, axis=None): (1)
L462 @array_function_dispatch(_repeat_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L463 def repeat(a, repeats, axis=None): (2)
L509 def _put_dispatcher(a, ind, v, mode=None): (1)
L513 @array_function_dispatch(_put_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L514 def put(a, ind, v, mode='raise'): (2)
L574 def _swapaxes_dispatcher(a, axis1, axis2): (1)
L578 @array_function_dispatch(_swapaxes_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L579 def swapaxes(a, axis1, axis2): (2)
L626 def _transpose_dispatcher(a, axes=None): (1)
L630 @array_function_dispatch(_transpose_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L631 def transpose(a, axes=None): (2)
L706 def _matrix_transpose_dispatcher(x): (1)
L709 @array_function_dispatch(_matrix_transpose_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L710 def matrix_transpose(x, /): (2)
L754 def _partition_dispatcher(a, kth, axis=None, kind=None, order=None): (1)
L758 @array_function_dispatch(_partition_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L759 def partition(a, kth, axis=-1, kind='introselect', order=None): (2)
L872 def _argpartition_dispatcher(a, kth, axis=None, kind=None, order=None): (1)
L876 @array_function_dispatch(_argpartition_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L877 def argpartition(a, kth, axis=-1, kind='introselect', order=None): (2)
L965 def _sort_dispatcher(a, axis=None, kind=None, order=None, *, stable=None): (1)
L969 @array_function_dispatch(_sort_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L970 def sort(a, axis=-1, kind=None, order=None, *, stable=None): (2)
L1126 def _argsort_dispatcher(a, axis=None, kind=None, order=None, *, stable=None): (1)
L1130 @array_function_dispatch(_argsort_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1131 def argsort(a, axis=-1, kind=None, order=None, *, stable=None): (2)
L1247 def _argmax_dispatcher(a, axis=None, out=None, *, keepdims=np._NoValue): (1)
L1251 @array_function_dispatch(_argmax_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1252 def argmax(a, axis=None, out=None, *, keepdims=np._NoValue): (2)
L1345 def _argmin_dispatcher(a, axis=None, out=None, *, keepdims=np._NoValue): (1)
L1349 @array_function_dispatch(_argmin_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1350 def argmin(a, axis=None, out=None, *, keepdims=np._NoValue): (2)
L1443 def _searchsorted_dispatcher(a, v, side=None, sorter=None): (1)
L1447 @array_function_dispatch(_searchsorted_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1448 def searchsorted(a, v, side='left', sorter=None): (2)
L1530 def _resize_dispatcher(a, new_shape): (1)
L1534 @array_function_dispatch(_resize_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1535 def resize(a, new_shape): (2)
L1617 def _squeeze_dispatcher(a, axis=None): (1)
L1621 @array_function_dispatch(_squeeze_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1622 def squeeze(a, axis=None): (2)
L1691 def _diagonal_dispatcher(a, offset=None, axis1=None, axis2=None): (1)
L1695 @array_function_dispatch(_diagonal_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1696 def diagonal(a, offset=0, axis1=0, axis2=1): (2)
L1827 a, offset=None, axis1=None, axis2=None, dtype=None, out=None): (1)
L1826 def _trace_dispatcher( (1)
L1831 @array_function_dispatch(_trace_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1832 def trace(a, offset=0, axis1=0, axis2=1, dtype=None, out=None): (2)
L1900 def _ravel_dispatcher(a, order=None): (1)
L1904 @array_function_dispatch(_ravel_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1905 def ravel(a, order='C'): (2)
L2014 def _nonzero_dispatcher(a): (1)
L2018 @array_function_dispatch(_nonzero_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2019 def nonzero(a): (2)
L2114 def _shape_dispatcher(a): (1)
L2118 @array_function_dispatch(_shape_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2119 def shape(a): (2)
L2167 def _compress_dispatcher(condition, a, axis=None, out=None): (1)
L2171 @array_function_dispatch(_compress_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2172 def compress(condition, a, axis=None, out=None): (2)
L2236 def _clip_dispatcher(a, a_min=None, a_max=None, out=None, *, min=None, (2)
L2237 max=None, **kwargs): (1)
L2241 @array_function_dispatch(_clip_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2242 def clip(a, a_min=np._NoValue, a_max=np._NoValue, out=None, *, (3)
L2243 min=np._NoValue, max=np._NoValue, **kwargs): (1)
L2333 def _sum_dispatcher(a, axis=None, dtype=None, out=None, keepdims=None, (2)
L2334 initial=None, where=None): (1)
L2338 @array_function_dispatch(_sum_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2339 def sum(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, (3)
L2340 initial=np._NoValue, where=np._NoValue): (1)
L2472 def _any_dispatcher(a, axis=None, out=None, keepdims=None, *, (2)
L2473 where=np._NoValue): (1)
L2477 @array_function_dispatch(_any_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2478 def any(a, axis=None, out=None, keepdims=np._NoValue, *, where=np._NoValue): (2)
L2584 def _all_dispatcher(a, axis=None, out=None, keepdims=None, *, (2)
L2585 where=None): (1)
L2589 @array_function_dispatch(_all_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2590 def all(a, axis=None, out=None, keepdims=np._NoValue, *, where=np._NoValue): (2)
L2679 def _cumulative_func(x, func, axis, dtype, out, include_initial): (1)
L2708 def _cumulative_prod_dispatcher(x, /, *, axis=None, dtype=None, out=None, (2)
L2709 include_initial=None): (1)
L2713 @array_function_dispatch(_cumulative_prod_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2714 def cumulative_prod(x, /, *, axis=None, dtype=None, out=None, (3)
L2715 include_initial=False): (1)
L2785 def _cumulative_sum_dispatcher(x, /, *, axis=None, dtype=None, out=None, (2)
L2786 include_initial=None): (1)
L2790 @array_function_dispatch(_cumulative_sum_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2791 def cumulative_sum(x, /, *, axis=None, dtype=None, out=None, (3)
L2792 include_initial=False): (1)
L2875 def _cumsum_dispatcher(a, axis=None, dtype=None, out=None): (1)
L2879 @array_function_dispatch(_cumsum_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2880 def cumsum(a, axis=None, dtype=None, out=None): (2)
L2958 def _ptp_dispatcher(a, axis=None, out=None, keepdims=None): (1)
L2962 @array_function_dispatch(_ptp_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2963 def ptp(a, axis=None, out=None, keepdims=np._NoValue): (2)
L3047 def _max_dispatcher(a, axis=None, out=None, keepdims=None, initial=None, (2)
L3048 where=None): (1)
L3052 @array_function_dispatch(_max_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3053 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L3054 def max(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, (3)
L3055 where=np._NoValue): (1)
L3168 @array_function_dispatch(_max_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3169 def amax(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, (3)
L3170 where=np._NoValue): (1)
L3185 def _min_dispatcher(a, axis=None, out=None, keepdims=None, initial=None, (2)
L3186 where=None): (1)
L3190 @array_function_dispatch(_min_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3191 def min(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, (3)
L3192 where=np._NoValue): (1)
L3306 @array_function_dispatch(_min_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3307 def amin(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, (3)
L3308 where=np._NoValue): (1)
L3323 def _prod_dispatcher(a, axis=None, dtype=None, out=None, keepdims=None, (2)
L3324 initial=None, where=None): (1)
L3328 @array_function_dispatch(_prod_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3329 def prod(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, (3)
L3330 initial=np._NoValue, where=np._NoValue): (1)
L3449 def _cumprod_dispatcher(a, axis=None, dtype=None, out=None): (1)
L3453 @array_function_dispatch(_cumprod_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3454 def cumprod(a, axis=None, dtype=None, out=None): (2)
L3519 def _ndim_dispatcher(a): (1)
L3523 @array_function_dispatch(_ndim_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3524 def ndim(a): (2)
L3562 def _size_dispatcher(a, axis=None): (1)
L3566 @array_function_dispatch(_size_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3567 def size(a, axis=None): (2)
L3614 def _round_dispatcher(a, decimals=None, out=None): (1)
L3618 @array_function_dispatch(_round_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3619 def round(a, decimals=0, out=None): (2)
L3713 @array_function_dispatch(_round_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3714 def around(a, decimals=0, out=None): (2)
L3730 def _mean_dispatcher(a, axis=None, dtype=None, out=None, keepdims=None, *, (2)
L3731 where=None): (1)
L3735 @array_function_dispatch(_mean_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3736 def mean(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, *, (3)
L3737 where=np._NoValue): (1)
L3864 def _std_dispatcher(a, axis=None, dtype=None, out=None, ddof=None, (3)
L3865 keepdims=None, *, where=None, mean=None, correction=None): (2)
L3869 @array_function_dispatch(_std_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3870 def std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue, *, (3)
L3871 where=np._NoValue, mean=np._NoValue, correction=np._NoValue): (1)
L4068 def _var_dispatcher(a, axis=None, dtype=None, out=None, ddof=None, (3)
L4069 keepdims=None, *, where=None, mean=None, correction=None): (2)
L4073 @array_function_dispatch(_var_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L4074 def var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue, *, (3)
L4075 where=np._NoValue, mean=np._NoValue, correction=np._NoValue): (1)
_methods.py (4)
L13 from numpy._core import umath as um (1)
L14 from numpy._core.multiarray import asanyarray (1)
L15 from numpy._core import numerictypes as nt (1)
L16 from numpy._core import _exceptions (1)
L17 from numpy._globals import _NoValue (1)
L20 bool_dt = mu.dtype("bool") (1)
L21 umr_maximum = um.maximum.reduce (1)
L22 umr_minimum = um.minimum.reduce (1)
L23 umr_sum = um.add.reduce (1)
L24 umr_prod = um.multiply.reduce (1)
L25 umr_bitwise_count = um.bitwise_count (1)
L26 umr_any = um.logical_or.reduce (1)
L27 umr_all = um.logical_and.reduce (1)
L31 nt.dtype(nt.csingle) : nt.dtype(nt.single), (1)
L32 nt.dtype(nt.cdouble) : nt.dtype(nt.double), (1)
L30 _complex_to_float = { (1)
L35 if nt.dtype(nt.longdouble) != nt.dtype(nt.double): (1)
L42 def _amax(a, axis=None, out=None, keepdims=False, (2)
L43 initial=_NoValue, where=True): (1)
L46 def _amin(a, axis=None, out=None, keepdims=False, (2)
L47 initial=_NoValue, where=True): (1)
L50 def _sum(a, axis=None, dtype=None, out=None, keepdims=False, (2)
L51 initial=_NoValue, where=True): (1)
L54 def _prod(a, axis=None, dtype=None, out=None, keepdims=False, (2)
L55 initial=_NoValue, where=True): (1)
L58 def _any(a, axis=None, dtype=None, out=None, keepdims=False, *, where=True): (1)
L67 def _all(a, axis=None, dtype=None, out=None, keepdims=False, *, where=True): (1)
L76 def _count_reduce_items(arr, axis, keepdims=False, where=True): (1)
L99 def _clip(a, min=None, max=None, out=None, **kwargs): (1)
L118 def _mean(a, axis=None, dtype=None, out=None, keepdims=False, *, where=True): (1)
L151 def _var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False, *, (2)
L152 where=True, mean=None): (1)
L221 def _std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False, *, (2)
L222 where=True, mean=None): (1)
L235 def _ptp(a, axis=None, out=None, keepdims=False): (1)
L242 def _dump(self, file, protocol=2): (1)
L250 def _dumps(self, protocol=2): (1)
L253 def _bitwise_count(a, out=None, *, where=True, casting='same_kind', (2)
L254 order='K', dtype=None, subok=True): (1)
_ufunc_config.py (1)
L12 from .umath import _make_extobj, _get_extobj_dict, _extobj_contextvar (1)
arrayprint.py (2)
L35 from .umath import absolute, isinf, isfinite, isnat (1)
L37 from .multiarray import (array, dragon4_positional, dragon4_scientific, (1)
records.py (4)
L7 from contextlib import nullcontext (1)
L9 from .._utils import set_module (1)
L10 from . import numeric as sb (1)
L11 from . import numerictypes as nt (1)
L12 from .arrayprint import _get_legacy_print_mode (1)
memmap.py (1)
L5 from .numeric import uint8, ndarray, dtype (1)
function_base.py (44)
L8 from .numeric import result_type, nan, asanyarray, ndim (1)
L13 __all__ = ['logspace', 'linspace', 'geomspace'] (1)
L16 array_function_dispatch = functools.partial( (2)
L17 overrides.array_function_dispatch, module='numpy') (1)
L20 def _linspace_dispatcher(start, stop, num=None, endpoint=None, retstep=None, (3)
L21 dtype=None, axis=None, *, device=None): (2)
L25 @array_function_dispatch(_linspace_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L26 def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, (4)
L27 axis=0, *, device=None): (2)
L190 def _logspace_dispatcher(start, stop, num=None, endpoint=None, base=None, (2)
L191 dtype=None, axis=None): (1)
L195 @array_function_dispatch(_logspace_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L196 def logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None, (3)
L197 axis=0): (1)
L305 def _geomspace_dispatcher(start, stop, num=None, endpoint=None, dtype=None, (2)
L306 axis=None): (1)
L310 @array_function_dispatch(_geomspace_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L311 def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): (2)
L455 def _needs_add_docstring(obj): (1)
L473 def _add_docstring(obj, doc, warn_on_python): (1)
L487 def add_newdoc(place, obj, doc, warn_on_python=True): (1)
L535 if isinstance(doc, str): (265)
L536 if "${ARRAY_FUNCTION_LIKE}" in doc: (51)
L538 _add_docstring(new, doc.strip(), warn_on_python) (51)
L474 if warn_on_python and not _needs_add_docstring(obj): (265)
L462 Py_TPFLAGS_HEAPTYPE = 1 << 9 (265)
L464 if isinstance(obj, (types.FunctionType, types.MethodType, property)): (265)
L467 if isinstance(obj, type) and obj.__flags__ & Py_TPFLAGS_HEAPTYPE: (265)
L470 return True (265)
L481 try: (265)
L482 add_docstring(obj, doc) (265)
_add_newdocs.py (258)
L70 add_newdoc('numpy._core', 'flatiter', ('base', (1)
L85 add_newdoc('numpy._core', 'flatiter', ('coords', (1)
L104 add_newdoc('numpy._core', 'flatiter', ('index', (1)
L124 add_newdoc('numpy._core', 'flatiter', ('__array__', (1)
L130 add_newdoc('numpy._core', 'flatiter', ('copy', (1)
L156 add_newdoc('numpy._core', 'nditer', (2)
L157 """ (1)
L428 add_newdoc('numpy._core', 'nditer', ('copy', (1)
L448 add_newdoc('numpy._core', 'nditer', ('operands', (1)
L455 add_newdoc('numpy._core', 'nditer', ('debug_print', (1)
L463 add_newdoc('numpy._core', 'nditer', ('enable_external_loop', (1)
L473 add_newdoc('numpy._core', 'nditer', ('iternext', (1)
L488 add_newdoc('numpy._core', 'nditer', ('remove_axis', (1)
L497 add_newdoc('numpy._core', 'nditer', ('remove_multi_index', (1)
L506 add_newdoc('numpy._core', 'nditer', ('reset', (1)
L514 add_newdoc('numpy._core', 'nested_iters', (2)
L515 """ (1)
L578 add_newdoc('numpy._core', 'nditer', ('close', (1)
L598 add_newdoc('numpy._core', 'broadcast', (2)
L599 """ (1)
L649 add_newdoc('numpy._core', 'broadcast', ('index', (1)
L669 add_newdoc('numpy._core', 'broadcast', ('iters', (1)
L693 add_newdoc('numpy._core', 'broadcast', ('ndim', (1)
L708 add_newdoc('numpy._core', 'broadcast', ('nd', (1)
L724 add_newdoc('numpy._core', 'broadcast', ('numiter', (1)
L739 add_newdoc('numpy._core', 'broadcast', ('shape', (1)
L754 add_newdoc('numpy._core', 'broadcast', ('size', (1)
L769 add_newdoc('numpy._core', 'broadcast', ('reset', (1)
L807 add_newdoc('numpy._core.multiarray', 'array', (2)
L808 """ (1)
L932 add_newdoc('numpy._core.multiarray', 'asarray', (2)
L933 """ (1)
L1024 add_newdoc('numpy._core.multiarray', 'asanyarray', (2)
L1025 """ (1)
L1100 add_newdoc('numpy._core.multiarray', 'ascontiguousarray', (2)
L1101 """ (1)
L1163 add_newdoc('numpy._core.multiarray', 'asfortranarray', (2)
L1164 """ (1)
L1226 add_newdoc('numpy._core.multiarray', 'empty', (2)
L1227 """ (1)
L1286 add_newdoc('numpy._core.multiarray', 'scalar', (2)
L1287 """ (1)
L1300 add_newdoc('numpy._core.multiarray', 'zeros', (2)
L1301 """ (1)
L1357 add_newdoc('numpy._core.multiarray', 'set_typeDict', (2)
L1358 """set_typeDict(dict) (1)
L1365 add_newdoc('numpy._core.multiarray', 'fromstring', (2)
L1366 """ (1)
L1425 add_newdoc('numpy._core.multiarray', 'compare_chararrays', (2)
L1426 """ (1)
L1463 add_newdoc('numpy._core.multiarray', 'fromiter', (2)
L1464 """ (1)
L1518 add_newdoc('numpy._core.multiarray', 'fromfile', (2)
L1519 """ (1)
L1601 add_newdoc('numpy._core.multiarray', 'frombuffer', (2)
L1602 """ (1)
L1661 add_newdoc('numpy._core.multiarray', 'from_dlpack', (2)
L1662 """ (1)
L1708 add_newdoc('numpy._core.multiarray', 'correlate', (2)
L1709 """cross_correlate(a,v, mode=0)""") (1)
L1711 add_newdoc('numpy._core.multiarray', 'arange', (2)
L1712 """ (1)
L1827 add_newdoc('numpy._core.multiarray', '_get_ndarray_c_version', (2)
L1828 """_get_ndarray_c_version() (1)
L1834 add_newdoc('numpy._core.multiarray', '_reconstruct', (2)
L1835 """_reconstruct(subtype, shape, dtype) (1)
L1841 add_newdoc('numpy._core.multiarray', 'promote_types', (2)
L1842 """ (1)
L1909 add_newdoc('numpy._core.multiarray', 'c_einsum', (2)
L1910 """ (1)
L2228 add_newdoc('numpy._core.multiarray', 'ndarray', (2)
L2229 """ (1)
L2360 add_newdoc('numpy._core.multiarray', 'ndarray', ('__array_interface__', (1)
L2364 add_newdoc('numpy._core.multiarray', 'ndarray', ('__array_priority__', (1)
L2368 add_newdoc('numpy._core.multiarray', 'ndarray', ('__array_struct__', (1)
L2371 add_newdoc('numpy._core.multiarray', 'ndarray', ('__dlpack__', (1)
L2379 add_newdoc('numpy._core.multiarray', 'ndarray', ('__dlpack_device__', (1)
L2387 add_newdoc('numpy._core.multiarray', 'ndarray', ('base', (1)
L2409 add_newdoc('numpy._core.multiarray', 'ndarray', ('ctypes', (1)
L2487 add_newdoc('numpy._core.multiarray', 'ndarray', ('data', (1)
L2491 add_newdoc('numpy._core.multiarray', 'ndarray', ('dtype', (1)
L2528 add_newdoc('numpy._core.multiarray', 'ndarray', ('imag', (1)
L2544 add_newdoc('numpy._core.multiarray', 'ndarray', ('itemsize', (1)
L2561 add_newdoc('numpy._core.multiarray', 'ndarray', ('flags', (1)
L2632 add_newdoc('numpy._core.multiarray', 'ndarray', ('flat', (1)
L2675 add_newdoc('numpy._core.multiarray', 'ndarray', ('nbytes', (1)
L2702 add_newdoc('numpy._core.multiarray', 'ndarray', ('ndim', (1)
L2719 add_newdoc('numpy._core.multiarray', 'ndarray', ('real', (1)
L2739 add_newdoc('numpy._core.multiarray', 'ndarray', ('shape', (1)
L2788 add_newdoc('numpy._core.multiarray', 'ndarray', ('size', (1)
L2815 add_newdoc('numpy._core.multiarray', 'ndarray', ('strides', (1)
L2884 add_newdoc('numpy._core.multiarray', 'ndarray', ('T', (1)
L2914 add_newdoc('numpy._core.multiarray', 'ndarray', ('mT', (1)
L2961 add_newdoc('numpy._core.multiarray', 'ndarray', ('__array__', (1)
L2980 add_newdoc('numpy._core.multiarray', 'ndarray', ('__array_finalize__', (1)
L2989 add_newdoc('numpy._core.multiarray', 'ndarray', ('__array_wrap__', (1)
L2998 add_newdoc('numpy._core.multiarray', 'ndarray', ('__copy__', (1)
L3009 add_newdoc('numpy._core.multiarray', 'ndarray', ('__class_getitem__', (1)
L3039 add_newdoc('numpy._core.multiarray', 'ndarray', ('__deepcopy__', (1)
L3048 add_newdoc('numpy._core.multiarray', 'ndarray', ('__reduce__', (1)
L3057 add_newdoc('numpy._core.multiarray', 'ndarray', ('__setstate__', (1)
L3079 add_newdoc('numpy._core.multiarray', 'ndarray', ('all', (1)
L3094 add_newdoc('numpy._core.multiarray', 'ndarray', ('any', (1)
L3109 add_newdoc('numpy._core.multiarray', 'ndarray', ('argmax', (1)
L3124 add_newdoc('numpy._core.multiarray', 'ndarray', ('argmin', (1)
L3139 add_newdoc('numpy._core.multiarray', 'ndarray', ('argsort', (1)
L3154 add_newdoc('numpy._core.multiarray', 'ndarray', ('argpartition', (1)
L3169 add_newdoc('numpy._core.multiarray', 'ndarray', ('astype', (1)
L3232 add_newdoc('numpy._core.multiarray', 'ndarray', ('byteswap', (1)
L3287 add_newdoc('numpy._core.multiarray', 'ndarray', ('choose', (1)
L3302 add_newdoc('numpy._core.multiarray', 'ndarray', ('clip', (1)
L3318 add_newdoc('numpy._core.multiarray', 'ndarray', ('compress', (1)
L3333 add_newdoc('numpy._core.multiarray', 'ndarray', ('conj', (1)
L3348 add_newdoc('numpy._core.multiarray', 'ndarray', ('conjugate', (1)
L3363 add_newdoc('numpy._core.multiarray', 'ndarray', ('copy', (1)
L3436 add_newdoc('numpy._core.multiarray', 'ndarray', ('cumprod', (1)
L3451 add_newdoc('numpy._core.multiarray', 'ndarray', ('cumsum', (1)
L3466 add_newdoc('numpy._core.multiarray', 'ndarray', ('diagonal', (1)
L3483 add_newdoc('numpy._core.multiarray', 'ndarray', ('dot')) (1)
L3501 add_newdoc('numpy._core.multiarray', 'ndarray', ('dumps', (1)
L3515 add_newdoc('numpy._core.multiarray', 'ndarray', ('fill', (1)
L3559 add_newdoc('numpy._core.multiarray', 'ndarray', ('flatten', (1)
L3598 add_newdoc('numpy._core.multiarray', 'ndarray', ('getfield', (1)
L3641 add_newdoc('numpy._core.multiarray', 'ndarray', ('item', (1)
L3707 add_newdoc('numpy._core.multiarray', 'ndarray', ('max', (1)
L3722 add_newdoc('numpy._core.multiarray', 'ndarray', ('mean', (1)
L3737 add_newdoc('numpy._core.multiarray', 'ndarray', ('min', (1)
L3752 add_newdoc('numpy._core.multiarray', 'ndarray', ('nonzero', (1)
L3767 add_newdoc('numpy._core.multiarray', 'ndarray', ('prod', (1)
L3783 add_newdoc('numpy._core.multiarray', 'ndarray', ('put', (1)
L3798 add_newdoc('numpy._core.multiarray', 'ndarray', ('ravel', (1)
L3815 add_newdoc('numpy._core.multiarray', 'ndarray', ('repeat', (1)
L3830 add_newdoc('numpy._core.multiarray', 'ndarray', ('reshape', (1)
L3852 add_newdoc('numpy._core.multiarray', 'ndarray', ('resize', (1)
L3946 add_newdoc('numpy._core.multiarray', 'ndarray', ('round', (1)
L3961 add_newdoc('numpy._core.multiarray', 'ndarray', ('searchsorted', (1)
L3976 add_newdoc('numpy._core.multiarray', 'ndarray', ('setfield', (1)
L4028 add_newdoc('numpy._core.multiarray', 'ndarray', ('setflags', (1)
L4105 add_newdoc('numpy._core.multiarray', 'ndarray', ('sort', (1)
L4165 add_newdoc('numpy._core.multiarray', 'ndarray', ('partition', (1)
L4224 add_newdoc('numpy._core.multiarray', 'ndarray', ('squeeze', (1)
L4239 add_newdoc('numpy._core.multiarray', 'ndarray', ('std', (1)
L4254 add_newdoc('numpy._core.multiarray', 'ndarray', ('sum', (1)
L4269 add_newdoc('numpy._core.multiarray', 'ndarray', ('swapaxes', (1)
L4284 add_newdoc('numpy._core.multiarray', 'ndarray', ('take', (1)
L4299 add_newdoc('numpy._core.multiarray', 'ndarray', ('tofile', (1)
L4339 add_newdoc('numpy._core.multiarray', 'ndarray', ('tolist', (1)
L4404 add_newdoc('numpy._core.multiarray', 'ndarray', ('tobytes', """ (1)
L4445 add_newdoc('numpy._core.multiarray', 'ndarray', ('tostring', r""" (1)
L4457 add_newdoc('numpy._core.multiarray', 'ndarray', ('trace', (1)
L4472 add_newdoc('numpy._core.multiarray', 'ndarray', ('transpose', (1)
L4529 add_newdoc('numpy._core.multiarray', 'ndarray', ('var', (1)
L4544 add_newdoc('numpy._core.multiarray', 'ndarray', ('view', (1)
L4671 add_newdoc('numpy._core.umath', 'frompyfunc', (2)
L4672 """ (1)
L4729 add_newdoc('numpy._core.multiarray', 'add_docstring', (2)
L4730 """ (1)
L4739 add_newdoc('numpy._core.umath', '_add_newdoc_ufunc', (2)
L4740 """ (1)
L4765 add_newdoc('numpy._core.multiarray', 'get_handler_name', (2)
L4766 """ (1)
L4775 add_newdoc('numpy._core.multiarray', 'get_handler_version', (2)
L4776 """ (1)
L4785 add_newdoc('numpy._core._multiarray_umath', '_array_converter', (2)
L4786 """ (1)
L4798 add_newdoc( (2)
L4799 'numpy._core._multiarray_umath', '_array_converter', ('scalar_input', (1)
L4806 add_newdoc('numpy._core._multiarray_umath', '_array_converter', ('as_arrays', (1)
L4822 add_newdoc('numpy._core._multiarray_umath', '_array_converter', ('result_type', (1)
L4839 add_newdoc('numpy._core._multiarray_umath', '_array_converter', ('wrap', (1)
L4861 add_newdoc('numpy._core.multiarray', '_get_madvise_hugepage', (2)
L4862 """ (1)
L4870 add_newdoc('numpy._core.multiarray', '_set_madvise_hugepage', (2)
L4871 """ (1)
L4893 add_newdoc('numpy._core', 'ufunc', (2)
L4894 """ (1)
L4951 add_newdoc('numpy._core', 'ufunc', ('identity', (1)
L4971 add_newdoc('numpy._core', 'ufunc', ('nargs', (1)
L4996 add_newdoc('numpy._core', 'ufunc', ('nin', (1)
L5015 add_newdoc('numpy._core', 'ufunc', ('nout', (1)
L5039 add_newdoc('numpy._core', 'ufunc', ('ntypes', (1)
L5066 add_newdoc('numpy._core', 'ufunc', ('types', (1)
L5104 add_newdoc('numpy._core', 'ufunc', ('signature', (1)
L5142 add_newdoc('numpy._core', 'ufunc', ('reduce', (1)
L5262 add_newdoc('numpy._core', 'ufunc', ('accumulate', (1)
L5339 add_newdoc('numpy._core', 'ufunc', ('reduceat', (1)
L5446 add_newdoc('numpy._core', 'ufunc', ('outer', (1)
L5517 add_newdoc('numpy._core', 'ufunc', ('at', (1)
L5568 add_newdoc('numpy._core', 'ufunc', ('resolve_dtypes', (1)
L5640 add_newdoc('numpy._core', 'ufunc', ('_resolve_dtypes_and_context', (1)
L5663 add_newdoc('numpy._core', 'ufunc', ('_get_strided_loop', (1)
L5733 add_newdoc('numpy._core.multiarray', 'dtype', (2)
L5734 """ (1)
L5827 add_newdoc('numpy._core.multiarray', 'dtype', ('alignment', (1)
L5847 add_newdoc('numpy._core.multiarray', 'dtype', ('byteorder', (1)
L5891 add_newdoc('numpy._core.multiarray', 'dtype', ('char', (1)
L5904 add_newdoc('numpy._core.multiarray', 'dtype', ('descr', (1)
L5929 add_newdoc('numpy._core.multiarray', 'dtype', ('fields', (1)
L5959 add_newdoc('numpy._core.multiarray', 'dtype', ('flags', (1)
L5984 add_newdoc('numpy._core.multiarray', 'dtype', ('hasobject', (1)
L5997 add_newdoc('numpy._core.multiarray', 'dtype', ('isbuiltin', (1)
L6028 add_newdoc('numpy._core.multiarray', 'dtype', ('isnative', (1)
L6035 add_newdoc('numpy._core.multiarray', 'dtype', ('isalignedstruct', (1)
L6044 add_newdoc('numpy._core.multiarray', 'dtype', ('itemsize', (1)
L6067 add_newdoc('numpy._core.multiarray', 'dtype', ('kind', (1)
L6101 add_newdoc('numpy._core.multiarray', 'dtype', ('metadata', (1)
L6141 add_newdoc('numpy._core.multiarray', 'dtype', ('name', (1)
L6160 add_newdoc('numpy._core.multiarray', 'dtype', ('names', (1)
L6175 add_newdoc('numpy._core.multiarray', 'dtype', ('num', (1)
L6195 add_newdoc('numpy._core.multiarray', 'dtype', ('shape', (1)
L6214 add_newdoc('numpy._core.multiarray', 'dtype', ('ndim', (1)
L6236 add_newdoc('numpy._core.multiarray', 'dtype', ('str', (1)
L6239 add_newdoc('numpy._core.multiarray', 'dtype', ('subdtype', (1)
L6268 add_newdoc('numpy._core.multiarray', 'dtype', ('base', (1)
L6290 add_newdoc('numpy._core.multiarray', 'dtype', ('type', (1)
L6361 add_newdoc('numpy._core.multiarray', 'dtype', ('__class_getitem__', (1)
L6387 add_newdoc('numpy._core.multiarray', 'dtype', ('__ge__', (1)
L6521 add_newdoc('numpy._core.multiarray', 'busdaycalendar', ('weekmask', (1)
L6524 add_newdoc('numpy._core.multiarray', 'busdaycalendar', ('holidays', (1)
L6527 add_newdoc('numpy._core.multiarray', 'normalize_axis_index', (2)
L6528 """ (1)
L6578 add_newdoc('numpy._core.multiarray', 'datetime_data', (2)
L6579 """ (1)
L6623 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6624 """ (1)
L6637 def refer_to_array_attribute(attr, method=True): (1)
L6647 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6648 refer_to_array_attribute('T', method=False)) (1)
L6638 docstring = """ (50)
L6644 return attr, docstring.format("method" if method else "attribute", attr) (50)
L6650 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6651 refer_to_array_attribute('base', method=False)) (1)
L6653 add_newdoc('numpy._core.numerictypes', 'generic', ('data', (1)
L6656 add_newdoc('numpy._core.numerictypes', 'generic', ('dtype', (1)
L6659 add_newdoc('numpy._core.numerictypes', 'generic', ('flags', (1)
L6662 add_newdoc('numpy._core.numerictypes', 'generic', ('flat', (1)
L6665 add_newdoc('numpy._core.numerictypes', 'generic', ('imag', (1)
L6668 add_newdoc('numpy._core.numerictypes', 'generic', ('itemsize', (1)
L6671 add_newdoc('numpy._core.numerictypes', 'generic', ('ndim', (1)
L6674 add_newdoc('numpy._core.numerictypes', 'generic', ('real', (1)
L6677 add_newdoc('numpy._core.numerictypes', 'generic', ('shape', (1)
L6680 add_newdoc('numpy._core.numerictypes', 'generic', ('size', (1)
L6683 add_newdoc('numpy._core.numerictypes', 'generic', ('strides', (1)
L6688 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6689 refer_to_array_attribute('all')) (1)
L6691 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6692 refer_to_array_attribute('any')) (1)
L6694 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6695 refer_to_array_attribute('argmax')) (1)
L6697 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6698 refer_to_array_attribute('argmin')) (1)
L6700 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6701 refer_to_array_attribute('argsort')) (1)
L6703 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6704 refer_to_array_attribute('astype')) (1)
L6706 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6707 refer_to_array_attribute('byteswap')) (1)
L6709 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6710 refer_to_array_attribute('choose')) (1)
L6712 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6713 refer_to_array_attribute('clip')) (1)
L6715 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6716 refer_to_array_attribute('compress')) (1)
L6718 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6719 refer_to_array_attribute('conjugate')) (1)
L6721 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6722 refer_to_array_attribute('copy')) (1)
L6724 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6725 refer_to_array_attribute('cumprod')) (1)
L6727 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6728 refer_to_array_attribute('cumsum')) (1)
L6730 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6731 refer_to_array_attribute('diagonal')) (1)
L6733 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6734 refer_to_array_attribute('dump')) (1)
L6736 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6737 refer_to_array_attribute('dumps')) (1)
L6739 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6740 refer_to_array_attribute('fill')) (1)
L6742 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6743 refer_to_array_attribute('flatten')) (1)
L6745 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6746 refer_to_array_attribute('getfield')) (1)
L6748 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6749 refer_to_array_attribute('item')) (1)
L6751 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6752 refer_to_array_attribute('max')) (1)
L6754 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6755 refer_to_array_attribute('mean')) (1)
L6757 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6758 refer_to_array_attribute('min')) (1)
L6760 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6761 refer_to_array_attribute('nonzero')) (1)
L6763 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6764 refer_to_array_attribute('prod')) (1)
L6766 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6767 refer_to_array_attribute('put')) (1)
L6769 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6770 refer_to_array_attribute('ravel')) (1)
L6772 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6773 refer_to_array_attribute('repeat')) (1)
L6775 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6776 refer_to_array_attribute('reshape')) (1)
L6778 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6779 refer_to_array_attribute('resize')) (1)
L6781 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6782 refer_to_array_attribute('round')) (1)
L6784 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6785 refer_to_array_attribute('searchsorted')) (1)
L6787 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6788 refer_to_array_attribute('setfield')) (1)
L6790 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6791 refer_to_array_attribute('setflags')) (1)
L6793 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6794 refer_to_array_attribute('sort')) (1)
L6796 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6797 refer_to_array_attribute('squeeze')) (1)
L6799 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6800 refer_to_array_attribute('std')) (1)
L6802 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6803 refer_to_array_attribute('sum')) (1)
L6805 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6806 refer_to_array_attribute('swapaxes')) (1)
L6808 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6809 refer_to_array_attribute('take')) (1)
L6811 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6812 refer_to_array_attribute('tofile')) (1)
L6814 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6815 refer_to_array_attribute('tolist')) (1)
L6817 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6818 refer_to_array_attribute('tostring')) (1)
L6820 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6821 refer_to_array_attribute('trace')) (1)
L6823 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6824 refer_to_array_attribute('transpose')) (1)
L6826 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6827 refer_to_array_attribute('var')) (1)
L6829 add_newdoc('numpy._core.numerictypes', 'generic', (2)
L6830 refer_to_array_attribute('view')) (1)
L6832 add_newdoc('numpy._core.numerictypes', 'number', ('__class_getitem__', (1)
L6866 add_newdoc('numpy._core.numerictypes', 'number', (2)
L6867 """ (1)
L6872 add_newdoc('numpy._core.numerictypes', 'integer', (2)
L6873 """ (1)
L6878 add_newdoc('numpy._core.numerictypes', 'signedinteger', (2)
L6879 """ (1)
L6884 add_newdoc('numpy._core.numerictypes', 'unsignedinteger', (2)
L6885 """ (1)
L6890 add_newdoc('numpy._core.numerictypes', 'inexact', (2)
L6891 """ (1)
L6898 add_newdoc('numpy._core.numerictypes', 'floating', (2)
L6899 """ (1)
L6904 add_newdoc('numpy._core.numerictypes', 'complexfloating', (2)
L6905 """ (1)
L6911 add_newdoc('numpy._core.numerictypes', 'flexible', (2)
L6912 """ (1)
L6919 add_newdoc('numpy._core.numerictypes', 'character', (2)
L6920 """ (1)
L6925 add_newdoc('numpy._core.multiarray', 'StringDType', (2)
L6926 """ (1)
L534 new = getattr(__import__(place, globals(), {}, [obj]), obj) (264)
L539 elif isinstance(doc, tuple): (214)
L540 attr, docstring = doc (214)
L541 _add_docstring(getattr(new, attr), docstring.strip(), warn_on_python) (214)
L537 doc = overrides.get_array_function_like_doc(new, doc) (12)
overrides.py (12)
L23 ARRAY_FUNCTIONS.add(public_api) (12)
L24 docstring = public_api.__doc__ or docstring_template (12)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (12)
L483 except Exception: (6)
L484 pass (6)
_add_newdocs.py (6)
L3486 add_newdoc('numpy._core.multiarray', 'ndarray', ('dump', (1)
L6299 add_newdoc('numpy._core.multiarray', 'dtype', ('newbyteorder', (1)
L6402 add_newdoc('numpy._core.multiarray', 'dtype', ('__le__', (1)
L6417 add_newdoc('numpy._core.multiarray', 'dtype', ('__gt__', (1)
L6433 add_newdoc('numpy._core.multiarray', 'dtype', ('__lt__', (1)
L6455 add_newdoc('numpy._core.multiarray', 'busdaycalendar', (2)
L6456 """ (1)
_machar.py (1)
L17 class MachAr: (2)
L18 """ (1)
L104 def __init__(self, float_conv=float,int_conv=int, (2)
L105 float_to_float=float, (1)
L106 float_to_str=lambda v:'%24.16e' % v, (1)
L107 title='Python floating point number'): (1)
L122 def _do_init(self, float_conv, int_conv, float_to_float, float_to_str, title): (1)
L339 def __str__(self): (1)
L355 if __name__ == '__main__': (1)
getlimits.py (3)
L10 from ._machar import MachAr (1)
L12 from . import numerictypes as ntypes (1)
L13 from .numeric import array, inf, nan (1)
_add_newdocs_scalars.py (2)
L9 from numpy._core import numerictypes as _numerictypes (1)
L10 from numpy._core.function_base import add_newdoc (1)
L18 def numeric_type_aliases(aliases): (1)
L31 possible_aliases = numeric_type_aliases([ (1)
L19 def type_aliases_gen(): (1)
L28 return list(type_aliases_gen()) (1)
L20 for alias, doc in aliases: (14)
L21 try: (14)
L22 alias_type = getattr(_numerictypes, alias) (14)
L27 yield (alias_type, alias, doc) (13)
_internal.py (1)
L16 try: (1)
L17 import ctypes (1)
_endian.py (1)
L4 _array_type = type(Array) (1)
L6 def _other_endian(typ): (1)
L23 class _swapped_meta: (2)
L24 def __setattr__(self, attrname, value): (1)
L34 class _swapped_struct_meta(_swapped_meta, type(Structure)): pass (2)
L35 class _swapped_union_meta(_swapped_meta, type(Union)): pass (2)
L43 if sys.byteorder == "little": (1)
L44 _OTHER_ENDIAN = "__ctype_be__" (1)
L46 LittleEndianStructure = Structure (1)
L48 class BigEndianStructure(Structure, metaclass=_swapped_struct_meta): (2)
L49 """Structure with big endian byte order""" (1)
L50 __slots__ = () (1)
L51 _swappedbytes_ = None (1)
L53 LittleEndianUnion = Union (1)
L55 class BigEndianUnion(Union, metaclass=_swapped_union_meta): (2)
L56 """Union with big endian byte order""" (1)
L57 __slots__ = () (1)
L58 _swappedbytes_ = None (1)
_array_utils_impl.py (2)
L5 from numpy._core.numeric import normalize_axis_tuple, normalize_axis_index (1)
L6 from numpy._utils import set_module (1)
L8 __all__ = ["byte_bounds", "normalize_axis_tuple", "normalize_axis_index"] (1)
L11 @set_module("numpy.lib.array_utils") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L12 def byte_bounds(a): (2)
mixins.py (1)
L7 __all__ = ['NDArrayOperatorsMixin'] (1)
L10 def _disables_array_ufunc(obj): (1)
L18 def _binary_method(ufunc, name): (1)
L28 def _reflected_binary_method(ufunc, name): (1)
L38 def _inplace_binary_method(ufunc, name): (1)
L46 def _numeric_methods(ufunc, name): (1)
L53 def _unary_method(ufunc, name): (1)
L61 class NDArrayOperatorsMixin: (2)
L62 """Mixin defining all operator special methods using __array_ufunc__. (1)
L141 __slots__ = () (1)
L146 __lt__ = _binary_method(um.less, 'lt') (1)
L20 def func(self, other): (20)
L24 func.__name__ = '__{}__'.format(name) (20)
L25 return func (20)
L147 __le__ = _binary_method(um.less_equal, 'le') (1)
L148 __eq__ = _binary_method(um.equal, 'eq') (1)
L149 __ne__ = _binary_method(um.not_equal, 'ne') (1)
L150 __gt__ = _binary_method(um.greater, 'gt') (1)
L151 __ge__ = _binary_method(um.greater_equal, 'ge') (1)
L154 __add__, __radd__, __iadd__ = _numeric_methods(um.add, 'add') (1)
L48 return (_binary_method(ufunc, name), (26)
L49 _reflected_binary_method(ufunc, name), (13)
L30 def func(self, other): (14)
L34 func.__name__ = '__r{}__'.format(name) (14)
L35 return func (14)
L50 _inplace_binary_method(ufunc, name)) (13)
L40 def func(self, other): (13)
L42 func.__name__ = '__i{}__'.format(name) (13)
L43 return func (13)
L155 __sub__, __rsub__, __isub__ = _numeric_methods(um.subtract, 'sub') (1)
L156 __mul__, __rmul__, __imul__ = _numeric_methods(um.multiply, 'mul') (1)
L157 __matmul__, __rmatmul__, __imatmul__ = _numeric_methods( (2)
L158 um.matmul, 'matmul') (1)
L160 __truediv__, __rtruediv__, __itruediv__ = _numeric_methods( (2)
L161 um.true_divide, 'truediv') (1)
L162 __floordiv__, __rfloordiv__, __ifloordiv__ = _numeric_methods( (2)
L163 um.floor_divide, 'floordiv') (1)
L164 __mod__, __rmod__, __imod__ = _numeric_methods(um.remainder, 'mod') (1)
L165 __divmod__ = _binary_method(um.divmod, 'divmod') (1)
L166 __rdivmod__ = _reflected_binary_method(um.divmod, 'divmod') (1)
L169 __pow__, __rpow__, __ipow__ = _numeric_methods(um.power, 'pow') (1)
L170 __lshift__, __rlshift__, __ilshift__ = _numeric_methods( (2)
L171 um.left_shift, 'lshift') (1)
L172 __rshift__, __rrshift__, __irshift__ = _numeric_methods( (2)
L173 um.right_shift, 'rshift') (1)
L174 __and__, __rand__, __iand__ = _numeric_methods(um.bitwise_and, 'and') (1)
L175 __xor__, __rxor__, __ixor__ = _numeric_methods(um.bitwise_xor, 'xor') (1)
L176 __or__, __ror__, __ior__ = _numeric_methods(um.bitwise_or, 'or') (1)
L179 __neg__ = _unary_method(um.negative, 'neg') (1)
L55 def func(self): (4)
L57 func.__name__ = '__{}__'.format(name) (4)
L58 return func (4)
L180 __pos__ = _unary_method(um.positive, 'pos') (1)
L181 __abs__ = _unary_method(um.absolute, 'abs') (1)
L182 __invert__ = _unary_method(um.invert, 'invert') (1)
_utils_impl.py (2)
L10 from numpy._utils import set_module (1)
L11 import numpy as np (1)
_npyio_impl.py (3)
L18 from ._datasource import DataSource (1)
L20 from numpy._core.multiarray import packbits, unpackbits (1)
L21 from numpy._core._multiarray_umath import _load_from_filelike (1)
L22 from numpy._core.overrides import finalize_array_function_like, set_module (1)
L23 from ._iotools import ( (1)
L31 __all__ = [ (1)
L37 array_function_dispatch = functools.partial( (2)
L38 overrides.array_function_dispatch, module='numpy') (1)
L41 class BagObj: (2)
L42 """ (1)
L72 def __init__(self, obj): (1)
L76 def __getattribute__(self, key): (1)
L82 def __dir__(self): (1)
L91 def zipfile_factory(file, *args, **kwargs): (1)
L106 @set_module('numpy.lib.npyio') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L107 class NpzFile(Mapping): (2)
L108 """ (1)
L179 zip = None (1)
L180 fid = None (1)
L181 _MAX_REPR_ARRAY_COUNT = 5 (1)
L183 def __init__(self, fid, own_fid=False, allow_pickle=False, (3)
L184 pickle_kwargs=None, *, (1)
L185 max_header_size=format._MAX_HEADER_SIZE): (1)
L204 def __enter__(self): (1)
L207 def __exit__(self, exc_type, exc_value, traceback): (1)
L210 def close(self): (1)
L223 def __del__(self): (1)
L227 def __iter__(self): (1)
L230 def __len__(self): (1)
L233 def __getitem__(self, key): (1)
L263 def __contains__(self, key): (1)
L266 def __repr__(self): (1)
L283 def get(self, key, default=None, /): (1)
L289 def items(self): (1)
L295 def keys(self): (1)
L301 def values(self): (1)
<frozen abc> (1)
L106 (1)
L107 (1)
L108 (1)
L308 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L309 def load(file, mmap_mode=None, allow_pickle=False, fix_imports=True, (4)
L310 encoding='ASCII', *, max_header_size=format._MAX_HEADER_SIZE): (2)
L497 def _save_dispatcher(file, arr, allow_pickle=None, fix_imports=None): (1)
L501 @array_function_dispatch(_save_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L502 def save(file, arr, allow_pickle=True, fix_imports=np._NoValue): (2)
L585 def _savez_dispatcher(file, *args, allow_pickle=True, **kwds): (1)
L590 @array_function_dispatch(_savez_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L591 def savez(file, *args, allow_pickle=True, **kwds): (2)
L686 def _savez_compressed_dispatcher(file, *args, allow_pickle=True, **kwds): (1)
L691 @array_function_dispatch(_savez_compressed_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L692 def savez_compressed(file, *args, allow_pickle=True, **kwds): (2)
L766 def _savez(file, args, kwds, compress, allow_pickle=True, pickle_kwargs=None): (1)
L803 def _ensure_ndmin_ndarray_check_param(ndmin): (1)
L813 def _ensure_ndmin_ndarray(a, *, ndmin: int): (1)
L837 _loadtxt_chunksize = 50000 (1)
L840 def _check_nonneg_int(value, name="argument"): (1)
L849 def _preprocess_comments(iterable, comments, encoding): (1)
L868 _loadtxt_chunksize = 50000 (1)
L871 def _read(fname, *, delimiter=',', comment='#', quote='"', (2)
L872 imaginary_unit='j', usecols=None, skiplines=0, (1)
L873 max_rows=None, converters=None, ndmin=None, unpack=False, (1)
L874 dtype=np.float64, encoding=None): (1)
L1129 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L1130 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1131 def loadtxt(fname, dtype=float, comments='#', delimiter=None, (4)
L1132 converters=None, skiprows=0, usecols=None, unpack=False, (1)
L1133 ndmin=0, encoding=None, max_rows=None, *, quotechar=None, (2)
L1134 like=None): (1)
L1403 _loadtxt_with_like = array_function_dispatch()(loadtxt) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1406 def _savetxt_dispatcher(fname, X, fmt=None, delimiter=None, newline=None, (2)
L1407 header=None, footer=None, comments=None, (1)
L1408 encoding=None): (1)
L1412 @array_function_dispatch(_savetxt_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (10)
L85 if args[i][:1] in ['', '.']: (9)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (10)
L85 if args[i][:1] in ['', '.']: (9)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1413 def savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', (3)
L1414 footer='', comments='# ', encoding=None): (1)
L1645 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1646 def fromregex(file, regexp, dtype, encoding=None): (2)
L1747 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L1748 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1749 def genfromtxt(fname, dtype=float, comments='#', delimiter=None, (4)
L1750 skip_header=0, skip_footer=0, converters=None, (1)
L1751 missing_values=None, filling_values=None, usecols=None, (1)
L1752 names=None, excludelist=None, (1)
L1753 deletechars=''.join(sorted(NameValidator.defaultdeletechars)), (1)
L1754 replace_space='_', autostrip=False, case_sensitive=True, (1)
L1755 defaultfmt="f%i", unpack=None, usemask=False, loose=True, (1)
L1756 invalid_raise=True, max_rows=None, encoding=None, (1)
L1757 *, ndmin=0, like=None): (1)
L2499 _genfromtxt_with_like = array_function_dispatch()(genfromtxt) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2502 def recfromtxt(fname, **kwargs): (1)
L2547 def recfromcsv(fname, **kwargs): (1)
_datasource.py (1)
L42 _open = open (1)
L45 def _check_mode(mode, encoding, newline): (1)
L73 class _FileOpeners: (2)
L74 """ (1)
L98 def __init__(self): (1)
L102 def _load(self): (1)
L129 def keys(self): (1)
L148 def __getitem__(self, key): (1)
L152 _file_openers = _FileOpeners() (1)
L99 self._loaded = False (1)
L100 self._file_openers = {None: open} (1)
L154 def open(path, mode='r', destpath=os.curdir, encoding=None, newline=None): (1)
L195 @set_module('numpy.lib.npyio') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L196 class DataSource: (2)
L197 """ (1)
L245 def __init__(self, destpath=os.curdir): (1)
L255 def __del__(self): (1)
L262 def _iszip(self, filename): (1)
L269 def _iswritemode(self, mode): (1)
L276 def _splitzipext(self, filename): (1)
L290 def _possible_names(self, filename): (1)
L299 def _isurl(self, path): (1)
L314 def _cache(self, path): (1)
L340 def _findfile(self, path): (1)
L371 def abspath(self, path): (1)
L413 def _sanitize_relative_path(self, path): (1)
L427 def exists(self, path): (1)
L483 def open(self, path, mode='r', encoding=None, newline=None): (1)
L532 class Repository (DataSource): (2)
L533 """ (1)
L572 def __init__(self, baseurl, destpath=os.curdir): (1)
L577 def __del__(self): (1)
L580 def _fullpath(self, path): (1)
L589 def _findfile(self, path): (1)
L593 def abspath(self, path): (1)
L616 def exists(self, path): (1)
L650 def open(self, path, mode='r', encoding=None, newline=None): (1)
L682 def listdir(self): (1)
_iotools.py (1)
L11 def _decode_line(line, encoding=None): (1)
L37 def _is_string_like(obj): (1)
L48 def _is_bytes_like(obj): (1)
L59 def has_nested_fields(ndtype): (1)
L84 def flatten_dtype(ndtype, flatten_base=False): (1)
L132 class LineSplitter: (2)
L133 """ (1)
L148 def autostrip(self, method): (1)
L168 def __init__(self, delimiter=None, comments='#', autostrip=True, (2)
L169 encoding=None): (1)
L197 def _delimited_splitter(self, line): (1)
L206 def _fixedwidth_splitter(self, line): (1)
L216 def _variablewidth_splitter(self, line): (1)
L224 def __call__(self, line): (1)
L228 class NameValidator: (2)
L229 """ (1)
L281 defaultexcludelist = ['return', 'file', 'print'] (1)
L282 defaultdeletechars = set(r"""~!@#$%^&*()-=+~\|]}[{';: /?.>,<""") (1)
L284 def __init__(self, excludelist=None, deletechars=None, (2)
L285 case_sensitive=None, replace_space='_'): (1)
L311 def validate(self, names, defaultfmt="f%i", nbfields=None): (1)
L381 def __call__(self, names, defaultfmt="f%i", nbfields=None): (1)
L385 def str2bool(value): (1)
L422 class ConverterError(Exception): (2)
L423 """ (1)
L427 pass (1)
L430 class ConverterLockError(ConverterError): (2)
L431 """ (1)
L435 pass (1)
L438 class ConversionWarning(UserWarning): (2)
L439 """ (1)
L448 pass (1)
L451 class StringConverter: (2)
L452 """ (1)
L499 _mapper = [(nx.bool, str2bool, False), (2)
L500 (nx.int_, int, -1),] (1)
L504 if nx.dtype(nx.int_).itemsize < nx.dtype(nx.int64).itemsize: (1)
L507 _mapper.extend([(nx.float64, float, nx.nan), (2)
L508 (nx.complex128, complex, nx.nan + 0j), (1)
L509 (nx.longdouble, nx.longdouble, nx.nan), (1)
L512 (nx.integer, int, -1), (1)
L513 (nx.floating, float, nx.nan), (1)
L514 (nx.complexfloating, complex, nx.nan + 0j), (1)
L517 (nx.str_, asunicode, '???'), (1)
L518 (nx.bytes_, asbytes, '???'), (1)
L521 @classmethod (2)
L522 def _getdtype(cls, val): (2)
L526 @classmethod (2)
L527 def _getsubdtype(cls, val): (2)
L531 @classmethod (2)
L532 def _dtypeortype(cls, dtype): (2)
L543 @classmethod (2)
L544 def upgrade_mapper(cls, func, default=None): (2)
L584 @classmethod (2)
L585 def _find_map_entry(cls, dtype): (2)
L598 def __init__(self, dtype_or_func=None, default=None, missing_values=None, (2)
L599 locked=False): (1)
L671 def _loose_call(self, value): (1)
L677 def _strict_call(self, value): (1)
L702 def __call__(self, value): (1)
L705 def _do_upgrade(self): (1)
L725 def upgrade(self, value): (1)
L753 def iterupgrade(self, value): (1)
L765 def update(self, func, default=None, testing_value=None, (2)
L766 missing_values='', locked=False): (1)
L823 def easy_dtype(ndtype, names=None, defaultfmt="f%i", **validationargs): (1)
_type_check_impl.py (2)
L12 import numpy._core.numeric as _nx (1)
L15 from ._ufunclike_impl import isneginf, isposinf (1)
_index_tricks_impl.py (2)
L8 import numpy._core.numeric as _nx (1)
L15 from numpy.lib.stride_tricks import as_strided (1)
L16 from numpy.lib._function_base_impl import diff (1)
defmatrix.py (2)
L8 import numpy._core.numeric as N (1)
L15 def _convert_from_string(data): (1)
L35 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L36 def asmatrix(data, dtype=None): (2)
L72 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L73 class matrix(N.ndarray): (2)
L74 """ (1)
L116 __array_priority__ = 10.0 (1)
L117 def __new__(subtype, data, dtype=None, copy=True): (1)
L172 def __array_finalize__(self, obj): (1)
L195 def __getitem__(self, index): (1)
L221 def __mul__(self, other): (1)
L229 def __rmul__(self, other): (1)
L232 def __imul__(self, other): (1)
L236 def __pow__(self, other): (1)
L239 def __ipow__(self, other): (1)
L243 def __rpow__(self, other): (1)
L246 def _align(self, axis): (1)
L259 def _collapse(self, axis): (1)
L270 def tolist(self): (1)
L293 def sum(self, axis=None, dtype=None, out=None): (1)
L329 def squeeze(self, axis=None): (1)
L382 def flatten(self, order='C'): (1)
L419 def mean(self, axis=None, dtype=None, out=None): (1)
L453 def std(self, axis=None, dtype=None, out=None, ddof=0): (1)
L487 def var(self, axis=None, dtype=None, out=None, ddof=0): (1)
L521 def prod(self, axis=None, dtype=None, out=None): (1)
L554 def any(self, axis=None, out=None): (1)
L577 def all(self, axis=None, out=None): (1)
L617 def max(self, axis=None, out=None): (1)
L652 def argmax(self, axis=None, out=None): (1)
L691 def min(self, axis=None, out=None): (1)
L726 def argmin(self, axis=None, out=None): (1)
L765 def ptp(self, axis=None, out=None): (1)
L798 @property (2)
L799 def I(self): (2)
L843 @property (2)
L844 def A(self): (2)
L873 @property (2)
L874 def A1(self): (2)
L903 def ravel(self, order='C'): (1)
L941 @property (2)
L942 def T(self): (2)
L974 @property (2)
L975 def H(self): (2)
L1010 getT = T.fget (1)
L1011 getA = A.fget (1)
L1012 getA1 = A1.fget (1)
L1013 getH = H.fget (1)
L1014 getI = I.fget (1)
L1016 def _from_string(str, gdict, ldict): (1)
L1041 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1042 def bmat(obj, ldict=None, gdict=None): (2)
typing.py (1)
L24 import collections.abc (1)
L25 import copyreg (1)
L26 import functools (1)
L27 import operator (1)
L28 import sys (1)
L29 import types (1)
L30 from types import WrapperDescriptorType, MethodWrapperType, MethodDescriptorType, GenericAlias (1)
types.py (1)
L335 if name == 'CapsuleType': (1)
L338 raise AttributeError(f"module {__name__!r} has no attribute {name!r}") (1)
L32 from _typing import ( (1)
_linalg.py (4)
L25 from numpy._core import ( (1)
L36 from numpy._globals import _NoValue (1)
L37 from numpy.lib._twodim_base_impl import triu, eye (1)
L41 from numpy._typing import NDArray (1)
L43 class EigResult(NamedTuple): (2)
typing.py (1)
L3113 assert NamedTuple in bases (1)
L3114 return (_NamedTuple,) (1)
L44 eigenvalues: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L45 eigenvectors: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (3)
L186 if not allow_special_forms: (3)
L187 invalid_generic_forms += (ClassVar,) (3)
L188 if is_argument: (3)
L189 invalid_generic_forms += (Final,) (3)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (3)
L166 if arg is None: (3)
L168 if isinstance(arg, str): (3)
L170 return arg (3)
L192 if (isinstance(arg, _GenericAlias) and (3)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (3)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L2999 assert _NamedTuple in bases (1)
L3000 for base in bases: (2)
L3001 if base is not _NamedTuple and base is not Generic: (1)
L3004 bases = tuple(tuple if base is _NamedTuple else base for base in bases) (3)
L3005 types = ns.get('__annotations__', {}) (1)
L3006 default_names = [] (1)
L3007 for field_name in types: (3)
L3008 if field_name in ns: (2)
L3010 elif default_names: (2)
L3015 nm_tpl = _make_nmtuple(typename, types.items(), (2)
L3016 defaults=[ns[n] for n in default_names], (1)
L3017 module=ns['__module__']) (1)
L2980 fields = [n for n, t in types] (3)
L2982 for n, t in types} (4)
L2981 types = {n: _type_check(t, f"field {n} annotation must be a type") (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L2983 nm_tpl = collections.namedtuple(name, fields, (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (4)
L400 if type(name) is not str: (3)
L402 if not name.isidentifier(): (3)
L405 if _iskeyword(name): (3)
L409 seen = set() (1)
L410 for name in field_names: (3)
L411 if name.startswith('_') and not rename: (2)
L414 if name in seen: (2)
L416 seen.add(name) (2)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L420 defaults = tuple(defaults) (1)
L421 if len(defaults) > len(field_names): (1)
L423 field_defaults = dict(reversed(list(zip(reversed(field_names), (2)
L424 reversed(defaults))))) (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (4)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L448 __new__.__defaults__ = defaults (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (3)
L509 doc = _sys.intern(f'Alias for field number {index}') (2)
L510 class_namespace[name] = _tuplegetter(index, doc) (2)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L2984 defaults=defaults, module=module) (1)
L2985 nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = types (1)
L2986 return nm_tpl (1)
L3018 nm_tpl.__bases__ = bases (1)
L3019 if Generic in bases: (1)
L3023 for key, val in ns.items(): (7)
L3024 if key in _prohibited: (6)
L3026 elif key not in _special: (6)
L3027 if key not in nm_tpl._fields: (4)
L3028 setattr(nm_tpl, key, val) (4)
L3029 try: (4)
L3030 set_name = type(val).__set_name__ (4)
L3031 except AttributeError: (4)
L3032 pass (4)
L3043 if Generic in bases: (1)
L3045 return nm_tpl (1)
L47 class EighResult(NamedTuple): (2)
typing.py (1)
L3113 assert NamedTuple in bases (1)
L3114 return (_NamedTuple,) (1)
L48 eigenvalues: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L49 eigenvectors: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (3)
L186 if not allow_special_forms: (3)
L187 invalid_generic_forms += (ClassVar,) (3)
L188 if is_argument: (3)
L189 invalid_generic_forms += (Final,) (3)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (3)
L166 if arg is None: (3)
L168 if isinstance(arg, str): (3)
L170 return arg (3)
L192 if (isinstance(arg, _GenericAlias) and (3)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (3)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L2999 assert _NamedTuple in bases (1)
L3000 for base in bases: (2)
L3001 if base is not _NamedTuple and base is not Generic: (1)
L3004 bases = tuple(tuple if base is _NamedTuple else base for base in bases) (3)
L3005 types = ns.get('__annotations__', {}) (1)
L3006 default_names = [] (1)
L3007 for field_name in types: (3)
L3008 if field_name in ns: (2)
L3010 elif default_names: (2)
L3015 nm_tpl = _make_nmtuple(typename, types.items(), (2)
L3016 defaults=[ns[n] for n in default_names], (1)
L3017 module=ns['__module__']) (1)
L2980 fields = [n for n, t in types] (3)
L2982 for n, t in types} (4)
L2981 types = {n: _type_check(t, f"field {n} annotation must be a type") (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L2983 nm_tpl = collections.namedtuple(name, fields, (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (4)
L400 if type(name) is not str: (3)
L402 if not name.isidentifier(): (3)
L405 if _iskeyword(name): (3)
L409 seen = set() (1)
L410 for name in field_names: (3)
L411 if name.startswith('_') and not rename: (2)
L414 if name in seen: (2)
L416 seen.add(name) (2)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L420 defaults = tuple(defaults) (1)
L421 if len(defaults) > len(field_names): (1)
L423 field_defaults = dict(reversed(list(zip(reversed(field_names), (2)
L424 reversed(defaults))))) (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (4)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L448 __new__.__defaults__ = defaults (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (3)
L509 doc = _sys.intern(f'Alias for field number {index}') (2)
L510 class_namespace[name] = _tuplegetter(index, doc) (2)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L2984 defaults=defaults, module=module) (1)
L2985 nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = types (1)
L2986 return nm_tpl (1)
L3018 nm_tpl.__bases__ = bases (1)
L3019 if Generic in bases: (1)
L3023 for key, val in ns.items(): (7)
L3024 if key in _prohibited: (6)
L3026 elif key not in _special: (6)
L3027 if key not in nm_tpl._fields: (4)
L3028 setattr(nm_tpl, key, val) (4)
L3029 try: (4)
L3030 set_name = type(val).__set_name__ (4)
L3031 except AttributeError: (4)
L3032 pass (4)
L3043 if Generic in bases: (1)
L3045 return nm_tpl (1)
L51 class QRResult(NamedTuple): (2)
typing.py (1)
L3113 assert NamedTuple in bases (1)
L3114 return (_NamedTuple,) (1)
L52 Q: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L53 R: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (3)
L186 if not allow_special_forms: (3)
L187 invalid_generic_forms += (ClassVar,) (3)
L188 if is_argument: (3)
L189 invalid_generic_forms += (Final,) (3)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (3)
L166 if arg is None: (3)
L168 if isinstance(arg, str): (3)
L170 return arg (3)
L192 if (isinstance(arg, _GenericAlias) and (3)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (3)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L2999 assert _NamedTuple in bases (1)
L3000 for base in bases: (2)
L3001 if base is not _NamedTuple and base is not Generic: (1)
L3004 bases = tuple(tuple if base is _NamedTuple else base for base in bases) (3)
L3005 types = ns.get('__annotations__', {}) (1)
L3006 default_names = [] (1)
L3007 for field_name in types: (3)
L3008 if field_name in ns: (2)
L3010 elif default_names: (2)
L3015 nm_tpl = _make_nmtuple(typename, types.items(), (2)
L3016 defaults=[ns[n] for n in default_names], (1)
L3017 module=ns['__module__']) (1)
L2980 fields = [n for n, t in types] (3)
L2982 for n, t in types} (4)
L2981 types = {n: _type_check(t, f"field {n} annotation must be a type") (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L2983 nm_tpl = collections.namedtuple(name, fields, (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (4)
L400 if type(name) is not str: (3)
L402 if not name.isidentifier(): (3)
L405 if _iskeyword(name): (3)
L409 seen = set() (1)
L410 for name in field_names: (3)
L411 if name.startswith('_') and not rename: (2)
L414 if name in seen: (2)
L416 seen.add(name) (2)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L420 defaults = tuple(defaults) (1)
L421 if len(defaults) > len(field_names): (1)
L423 field_defaults = dict(reversed(list(zip(reversed(field_names), (2)
L424 reversed(defaults))))) (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (4)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L448 __new__.__defaults__ = defaults (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (3)
L509 doc = _sys.intern(f'Alias for field number {index}') (2)
L510 class_namespace[name] = _tuplegetter(index, doc) (2)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L2984 defaults=defaults, module=module) (1)
L2985 nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = types (1)
L2986 return nm_tpl (1)
L3018 nm_tpl.__bases__ = bases (1)
L3019 if Generic in bases: (1)
L3023 for key, val in ns.items(): (7)
L3024 if key in _prohibited: (6)
L3026 elif key not in _special: (6)
L3027 if key not in nm_tpl._fields: (4)
L3028 setattr(nm_tpl, key, val) (4)
L3029 try: (4)
L3030 set_name = type(val).__set_name__ (4)
L3031 except AttributeError: (4)
L3032 pass (4)
L3043 if Generic in bases: (1)
L3045 return nm_tpl (1)
L55 class SlogdetResult(NamedTuple): (2)
typing.py (1)
L3113 assert NamedTuple in bases (1)
L3114 return (_NamedTuple,) (1)
L56 sign: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L57 logabsdet: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (3)
L186 if not allow_special_forms: (3)
L187 invalid_generic_forms += (ClassVar,) (3)
L188 if is_argument: (3)
L189 invalid_generic_forms += (Final,) (3)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (3)
L166 if arg is None: (3)
L168 if isinstance(arg, str): (3)
L170 return arg (3)
L192 if (isinstance(arg, _GenericAlias) and (3)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (3)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L2999 assert _NamedTuple in bases (1)
L3000 for base in bases: (2)
L3001 if base is not _NamedTuple and base is not Generic: (1)
L3004 bases = tuple(tuple if base is _NamedTuple else base for base in bases) (3)
L3005 types = ns.get('__annotations__', {}) (1)
L3006 default_names = [] (1)
L3007 for field_name in types: (3)
L3008 if field_name in ns: (2)
L3010 elif default_names: (2)
L3015 nm_tpl = _make_nmtuple(typename, types.items(), (2)
L3016 defaults=[ns[n] for n in default_names], (1)
L3017 module=ns['__module__']) (1)
L2980 fields = [n for n, t in types] (3)
L2982 for n, t in types} (4)
L2981 types = {n: _type_check(t, f"field {n} annotation must be a type") (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L2983 nm_tpl = collections.namedtuple(name, fields, (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (4)
L400 if type(name) is not str: (3)
L402 if not name.isidentifier(): (3)
L405 if _iskeyword(name): (3)
L409 seen = set() (1)
L410 for name in field_names: (3)
L411 if name.startswith('_') and not rename: (2)
L414 if name in seen: (2)
L416 seen.add(name) (2)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L420 defaults = tuple(defaults) (1)
L421 if len(defaults) > len(field_names): (1)
L423 field_defaults = dict(reversed(list(zip(reversed(field_names), (2)
L424 reversed(defaults))))) (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (4)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L448 __new__.__defaults__ = defaults (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (3)
L509 doc = _sys.intern(f'Alias for field number {index}') (2)
L510 class_namespace[name] = _tuplegetter(index, doc) (2)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L2984 defaults=defaults, module=module) (1)
L2985 nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = types (1)
L2986 return nm_tpl (1)
L3018 nm_tpl.__bases__ = bases (1)
L3019 if Generic in bases: (1)
L3023 for key, val in ns.items(): (7)
L3024 if key in _prohibited: (6)
L3026 elif key not in _special: (6)
L3027 if key not in nm_tpl._fields: (4)
L3028 setattr(nm_tpl, key, val) (4)
L3029 try: (4)
L3030 set_name = type(val).__set_name__ (4)
L3031 except AttributeError: (4)
L3032 pass (4)
L3043 if Generic in bases: (1)
L3045 return nm_tpl (1)
L59 class SVDResult(NamedTuple): (2)
typing.py (1)
L3113 assert NamedTuple in bases (1)
L3114 return (_NamedTuple,) (1)
L60 U: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L61 S: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (1)
L186 if not allow_special_forms: (1)
L187 invalid_generic_forms += (ClassVar,) (1)
L188 if is_argument: (1)
L189 invalid_generic_forms += (Final,) (1)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (1)
L166 if arg is None: (1)
L168 if isinstance(arg, str): (1)
L170 return arg (1)
L192 if (isinstance(arg, _GenericAlias) and (1)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (1)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L62 Vh: NDArray[Any] (1)
typing.py (1)
L1132 msg = "Parameters to generic types must be types." (1)
L1133 arg = _type_check(arg, msg, is_argument=True) (1)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L196 return arg (1)
L1134 if ((isinstance(arg, _GenericAlias) and arg.__origin__ is Unpack) or (1)
L1135 (isinstance(arg, GenericAlias) and getattr(arg, '__unpacked__', False))): (1)
L1137 return arg (1)
L2999 assert _NamedTuple in bases (1)
L3000 for base in bases: (2)
L3001 if base is not _NamedTuple and base is not Generic: (1)
L3004 bases = tuple(tuple if base is _NamedTuple else base for base in bases) (3)
L3005 types = ns.get('__annotations__', {}) (1)
L3006 default_names = [] (1)
L3007 for field_name in types: (4)
L3008 if field_name in ns: (3)
L3010 elif default_names: (3)
L3015 nm_tpl = _make_nmtuple(typename, types.items(), (2)
L3016 defaults=[ns[n] for n in default_names], (1)
L3017 module=ns['__module__']) (1)
L2980 fields = [n for n, t in types] (4)
L2982 for n, t in types} (5)
L2981 types = {n: _type_check(t, f"field {n} annotation must be a type") (5)
L197 if allow_special_forms and arg in (ClassVar, Final): (3)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (3)
L201 if type(arg) is tuple: (3)
L203 return arg (3)
L2983 nm_tpl = collections.namedtuple(name, fields, (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (5)
L400 if type(name) is not str: (4)
L402 if not name.isidentifier(): (4)
L405 if _iskeyword(name): (4)
L409 seen = set() (1)
L410 for name in field_names: (4)
L411 if name.startswith('_') and not rename: (3)
L414 if name in seen: (3)
L416 seen.add(name) (3)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L420 defaults = tuple(defaults) (1)
L421 if len(defaults) > len(field_names): (1)
L423 field_defaults = dict(reversed(list(zip(reversed(field_names), (2)
L424 reversed(defaults))))) (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (5)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L448 __new__.__defaults__ = defaults (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (4)
L509 doc = _sys.intern(f'Alias for field number {index}') (3)
L510 class_namespace[name] = _tuplegetter(index, doc) (3)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L2984 defaults=defaults, module=module) (1)
L2985 nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = types (1)
L2986 return nm_tpl (1)
L3018 nm_tpl.__bases__ = bases (1)
L3019 if Generic in bases: (1)
L3023 for key, val in ns.items(): (7)
L3024 if key in _prohibited: (6)
L3026 elif key not in _special: (6)
L3027 if key not in nm_tpl._fields: (4)
L3028 setattr(nm_tpl, key, val) (4)
L3029 try: (4)
L3030 set_name = type(val).__set_name__ (4)
L3031 except AttributeError: (4)
L3032 pass (4)
L3043 if Generic in bases: (1)
L3045 return nm_tpl (1)
L65 array_function_dispatch = functools.partial( (2)
L66 overrides.array_function_dispatch, module='numpy.linalg' (1)
L70 fortran_int = intc (1)
L73 @set_module('numpy.linalg') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L74 class LinAlgError(ValueError): (2)
L75 """ (1)
L103 def _raise_linalgerror_singular(err, flag): (1)
L106 def _raise_linalgerror_nonposdef(err, flag): (1)
L109 def _raise_linalgerror_eigenvalues_nonconvergence(err, flag): (1)
L112 def _raise_linalgerror_svd_nonconvergence(err, flag): (1)
L115 def _raise_linalgerror_lstsq(err, flag): (1)
L118 def _raise_linalgerror_qr(err, flag): (1)
L123 def _makearray(a): (1)
L128 def isComplexType(t): (1)
L132 _real_types_map = {single: single, (2)
L133 double: double, (1)
L134 csingle: single, (1)
L135 cdouble: double} (1)
L137 _complex_types_map = {single: csingle, (2)
L138 double: cdouble, (1)
L139 csingle: csingle, (1)
L140 cdouble: cdouble} (1)
L142 def _realType(t, default=double): (1)
L145 def _complexType(t, default=cdouble): (1)
L148 def _commonType(*arrays): (1)
L173 def _to_native_byte_order(*arrays): (1)
L186 def _assert_2d(*arrays): (1)
L192 def _assert_stacked_2d(*arrays): (1)
L198 def _assert_stacked_square(*arrays): (1)
L204 def _assert_finite(*arrays): (1)
L209 def _is_empty_2d(arr): (1)
L214 def transpose(a): (1)
L233 def _tensorsolve_dispatcher(a, b, axes=None): (1)
L237 @array_function_dispatch(_tensorsolve_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L238 def tensorsolve(a, b, axes=None): (2)
L316 def _solve_dispatcher(a, b): (1)
L320 @array_function_dispatch(_solve_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L321 def solve(a, b): (2)
L415 def _tensorinv_dispatcher(a, ind=None): (1)
L419 @array_function_dispatch(_tensorinv_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L420 def tensorinv(a, ind=2): (2)
L492 def _unary_dispatcher(a): (1)
L496 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L497 def inv(a): (2)
L613 def _matrix_power_dispatcher(a, n): (1)
L617 @array_function_dispatch(_matrix_power_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L618 def matrix_power(a, n): (2)
L736 def _cholesky_dispatcher(a, /, *, upper=None): (1)
L740 @array_function_dispatch(_cholesky_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L741 def cholesky(a, /, *, upper=False): (2)
L846 def _outer_dispatcher(x1, x2): (1)
L850 @array_function_dispatch(_outer_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L851 def outer(x1, x2, /): (2)
L924 def _qr_dispatcher(a, mode=None): (1)
L928 @array_function_dispatch(_qr_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L929 def qr(a, mode='reduced'): (2)
L1133 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1134 def eigvals(a): (2)
L1225 def _eigvalsh_dispatcher(a, UPLO=None): (1)
L1229 @array_function_dispatch(_eigvalsh_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1230 def eigvalsh(a, UPLO='L'): (2)
L1322 def _convertarray(a): (1)
L1331 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1332 def eig(a): (2)
L1485 @array_function_dispatch(_eigvalsh_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1486 def eigh(a, UPLO='L'): (2)
L1635 def _svd_dispatcher(a, full_matrices=None, compute_uv=None, hermitian=None): (1)
L1639 @array_function_dispatch(_svd_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1640 def svd(a, full_matrices=True, compute_uv=True, hermitian=False): (2)
L1827 def _svdvals_dispatcher(x): (1)
L1831 @array_function_dispatch(_svdvals_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1832 def svdvals(x, /): (2)
L1881 def _cond_dispatcher(x, p=None): (1)
L1885 @array_function_dispatch(_cond_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1886 def cond(x, p=None): (2)
L2006 def _matrix_rank_dispatcher(A, tol=None, hermitian=None, *, rtol=None): (1)
L2010 @array_function_dispatch(_matrix_rank_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2011 def matrix_rank(A, tol=None, hermitian=False, *, rtol=None): (2)
L2124 def _pinv_dispatcher(a, rcond=None, hermitian=None, *, rtol=None): (1)
L2128 @array_function_dispatch(_pinv_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2129 def pinv(a, rcond=None, hermitian=False, *, rtol=_NoValue): (2)
L2246 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2247 def slogdet(a): (2)
L2331 @array_function_dispatch(_unary_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2332 def det(a): (2)
L2390 def _lstsq_dispatcher(a, b, rcond=None): (1)
L2394 @array_function_dispatch(_lstsq_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2395 def lstsq(a, b, rcond=None): (2)
L2543 def _multi_svd_norm(x, row_axis, col_axis, op): (1)
L2571 def _norm_dispatcher(x, ord=None, axis=None, keepdims=None): (1)
L2575 @array_function_dispatch(_norm_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2576 def norm(x, ord=None, axis=None, keepdims=False): (2)
L2836 def _multidot_dispatcher(arrays, *, out=None): (1)
L2841 @array_function_dispatch(_multidot_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L2842 def multi_dot(arrays, *, out=None): (2)
L2961 def _multi_dot_three(A, B, C, out=None): (1)
L2982 def _multi_dot_matrix_chain_order(arrays, return_costs=False): (1)
L3023 def _multi_dot(arrays, order, i, j, out=None): (1)
L3038 def _diagonal_dispatcher(x, /, *, offset=None): (1)
L3042 @array_function_dispatch(_diagonal_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3043 def diagonal(x, /, *, offset=0): (2)
L3134 def _trace_dispatcher(x, /, *, offset=None, dtype=None): (1)
L3138 @array_function_dispatch(_trace_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3139 def trace(x, /, *, offset=0, dtype=None): (2)
L3219 def _cross_dispatcher(x1, x2, /, *, axis=None): (1)
L3223 @array_function_dispatch(_cross_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3224 def cross(x1, x2, /, *, axis=-1): (2)
L3298 def _matmul_dispatcher(x1, x2, /): (1)
L3302 @array_function_dispatch(_matmul_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3303 def matmul(x1, x2, /): (2)
L3388 def _tensordot_dispatcher(x1, x2, /, *, axes=None): (1)
L3392 @array_function_dispatch(_tensordot_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3393 def tensordot(x1, x2, /, *, axes=2): (2)
L3397 tensordot.__doc__ = _core_tensordot.__doc__ (1)
L3402 def _matrix_transpose_dispatcher(x): (1)
L3405 @array_function_dispatch(_matrix_transpose_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3406 def matrix_transpose(x, /): (2)
L3410 matrix_transpose.__doc__ = _core_matrix_transpose.__doc__ (1)
L3415 def _matrix_norm_dispatcher(x, /, *, keepdims=None, ord=None): (1)
L3418 @array_function_dispatch(_matrix_norm_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3419 def matrix_norm(x, /, *, keepdims=False, ord="fro"): (2)
L3478 def _vector_norm_dispatcher(x, /, *, axis=None, keepdims=None, ord=None): (1)
L3481 @array_function_dispatch(_vector_norm_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3482 def vector_norm(x, /, *, axis=None, keepdims=False, ord=2): (2)
L3580 def _vecdot_dispatcher(x1, x2, /, *, axis=None): (1)
L3583 @array_function_dispatch(_vecdot_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L3584 def vecdot(x1, x2, /, *, axis=-1): (2)
_twodim_base_impl.py (2)
L15 from numpy._core import iinfo (1)
L16 from numpy.lib._stride_tricks_impl import broadcast_to (1)
L19 __all__ = [ (1)
L25 array_function_dispatch = functools.partial( (2)
L26 overrides.array_function_dispatch, module='numpy') (1)
L29 i1 = iinfo(int8) (1)
getlimits.py (1)
L698 try: (1)
L699 self.dtype = numeric.dtype(int_type) (1)
L702 self.kind = self.dtype.kind (1)
L703 self.bits = self.dtype.itemsize * 8 (1)
L704 self.key = "%s%d" % (self.kind, self.bits) (1)
L705 if self.kind not in 'iu': (1)
L30 i2 = iinfo(int16) (1)
getlimits.py (1)
L698 try: (1)
L699 self.dtype = numeric.dtype(int_type) (1)
L702 self.kind = self.dtype.kind (1)
L703 self.bits = self.dtype.itemsize * 8 (1)
L704 self.key = "%s%d" % (self.kind, self.bits) (1)
L705 if self.kind not in 'iu': (1)
L31 i4 = iinfo(int32) (1)
getlimits.py (1)
L698 try: (1)
L699 self.dtype = numeric.dtype(int_type) (1)
L702 self.kind = self.dtype.kind (1)
L703 self.bits = self.dtype.itemsize * 8 (1)
L704 self.key = "%s%d" % (self.kind, self.bits) (1)
L705 if self.kind not in 'iu': (1)
L34 def _min_int(low, high): (1)
L45 def _flip_dispatcher(m): (1)
L49 @array_function_dispatch(_flip_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L50 def fliplr(m): (2)
L105 @array_function_dispatch(_flip_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L106 def flipud(m): (2)
L163 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L164 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L165 def eye(N, M=None, k=0, dtype=float, order='C', *, device=None, like=None): (2)
L238 _eye_with_like = array_function_dispatch()(eye) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L241 def _diag_dispatcher(v, k=None): (1)
L245 @array_function_dispatch(_diag_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L246 def diag(v, k=0): (2)
L318 @array_function_dispatch(_diag_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L319 def diagflat(v, k=0): (2)
L376 @finalize_array_function_like (2)
overrides.py (1)
L28 public_api.__doc__ = get_array_function_like_doc(public_api) (1)
L23 ARRAY_FUNCTIONS.add(public_api) (1)
L24 docstring = public_api.__doc__ or docstring_template (1)
L25 return docstring.replace("${ARRAY_FUNCTION_LIKE}", array_function_like_doc) (1)
L29 return public_api (1)
L377 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L378 def tri(N, M=None, k=0, dtype=float, *, like=None): (2)
L434 _tri_with_like = array_function_dispatch()(tri) (1)
overrides.py (1)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L148 co = implementation.__code__ (1)
L149 last_arg = co.co_argcount + co.co_kwonlyargcount - 1 (1)
L150 last_arg = co.co_varnames[last_arg] (1)
L151 if last_arg != "like" or co.co_kwonlyargcount == 0: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L437 def _trilu_dispatcher(m, k=None): (1)
L441 @array_function_dispatch(_trilu_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L442 def tril(m, k=0): (2)
L497 @array_function_dispatch(_trilu_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L498 def triu(m, k=0): (2)
L542 def _vander_dispatcher(x, N=None, increasing=None): (1)
L547 @array_function_dispatch(_vander_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L548 def vander(x, N=None, increasing=False): (2)
L637 def _histogram2d_dispatcher(x, y, bins=None, range=None, density=None, (2)
L638 weights=None): (1)
L655 @array_function_dispatch(_histogram2d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L656 def histogram2d(x, y, bins=10, range=None, density=None, weights=None): (2)
L825 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L826 def mask_indices(n, mask_func, k=0): (2)
L894 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L895 def tril_indices(n, k=0, m=None): (2)
L979 def _trilu_indices_form_dispatcher(arr, k=None): (1)
L983 @array_function_dispatch(_trilu_indices_form_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L984 def tril_indices_from(arr, k=0): (2)
L1041 @set_module('numpy') (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1042 def triu_indices(n, k=0, m=None): (2)
L1128 @array_function_dispatch(_trilu_indices_form_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1129 def triu_indices_from(arr, k=0): (2)
_nbit_base.py (1)
L3 from typing import final (1)
typing.py (1)
L3800 if attr in {"Pattern", "Match"}: (1)
L3803 elif attr in {"ContextManager", "AsyncContextManager"}: (1)
L3806 elif attr == "_collect_parameters": (1)
L3817 raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") (1)
L6 @final # Disallow the creation of arbitrary `NBitBase` subclasses (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L7 @set_module("numpy.typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L8 class NBitBase: (2)
L9 """ (1)
L52 def __init_subclass__(cls) -> None: (1)
L61 @final (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L62 @set_module("numpy._typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L64 class _256Bit(NBitBase): # type: ignore[misc] (2)
L65 pass (1)
L53 allowed_names = { (8)
L57 if cls.__name__ not in allowed_names: (8)
L59 super().__init_subclass__() (8)
L67 @final (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L68 @set_module("numpy._typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L69 class _128Bit(_256Bit): # type: ignore[misc] (2)
L70 pass (1)
L72 @final (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L73 @set_module("numpy._typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L74 class _96Bit(_128Bit): # type: ignore[misc] (2)
L75 pass (1)
L77 @final (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L78 @set_module("numpy._typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L79 class _80Bit(_96Bit): # type: ignore[misc] (2)
L80 pass (1)
L82 @final (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L83 @set_module("numpy._typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L84 class _64Bit(_80Bit): # type: ignore[misc] (2)
L85 pass (1)
L87 @final (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L88 @set_module("numpy._typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L89 class _32Bit(_64Bit): # type: ignore[misc] (2)
L90 pass (1)
L92 @final (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L93 @set_module("numpy._typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L94 class _16Bit(_32Bit): # type: ignore[misc] (2)
L95 pass (1)
L97 @final (3)
typing.py (1)
L2780 try: (1)
L2781 f.__final__ = True (1)
L2787 return f (1)
L98 @set_module("numpy._typing") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L99 class _8Bit(_16Bit): # type: ignore[misc] (2)
L100 pass (1)
_array_like.py (1)
L24 from ._nbit_base import _32Bit, _64Bit (1)
_ufunc.py (1)
L3 _UFunc_Nin1_Nout1 = ufunc (1)
L4 _UFunc_Nin2_Nout1 = ufunc (1)
L5 _UFunc_Nin1_Nout2 = ufunc (1)
L6 _UFunc_Nin2_Nout2 = ufunc (1)
L7 _GUFunc_Nin2_Nout1 = ufunc (1)
_function_base_impl.py (2)
L11 from numpy._core.numeric import ( (1)
L15 from numpy._core.umath import ( (1)
L19 from numpy._core.fromnumeric import ( (1)
L22 from numpy._core.numerictypes import typecodes (1)
L23 from numpy.lib._twodim_base_impl import diag (1)
L24 from numpy._core.multiarray import ( (1)
L28 from numpy._core._multiarray_umath import _array_converter (1)
L29 from numpy._utils import set_module (1)
L32 from numpy.lib._histograms_impl import histogram, histogramdd # noqa: F401 (1)
_histograms_impl.py (1)
L12 __all__ = ['histogram', 'histogramdd', 'histogram_bin_edges'] (1)
L14 array_function_dispatch = functools.partial( (2)
L15 overrides.array_function_dispatch, module='numpy') (1)
L19 _range = range (1)
L22 def _ptp(x): (1)
L32 def _hist_bin_sqrt(x, range): (1)
L53 def _hist_bin_sturges(x, range): (1)
L76 def _hist_bin_rice(x, range): (1)
L100 def _hist_bin_scott(x, range): (1)
L122 def _hist_bin_stone(x, range): (1)
L164 def _hist_bin_doane(x, range): (1)
L199 def _hist_bin_fd(x, range): (1)
L229 def _hist_bin_auto(x, range): (1)
L272 _hist_bin_selectors = {'stone': _hist_bin_stone, (2)
L273 'auto': _hist_bin_auto, (1)
L274 'doane': _hist_bin_doane, (1)
L275 'fd': _hist_bin_fd, (1)
L276 'rice': _hist_bin_rice, (1)
L277 'scott': _hist_bin_scott, (1)
L278 'sqrt': _hist_bin_sqrt, (1)
L279 'sturges': _hist_bin_sturges} (1)
L282 def _ravel_and_check_weights(a, weights): (1)
L303 def _get_outer_edges(a, range): (1)
L333 def _unsigned_subtract(a, b): (1)
L361 def _get_bin_edges(a, bins, range, weights): (1)
L461 def _search_sorted_inclusive(a, v): (1)
L473 def _histogram_bin_edges_dispatcher(a, bins=None, range=None, weights=None): (1)
L477 @array_function_dispatch(_histogram_bin_edges_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L478 def histogram_bin_edges(a, bins=10, range=None, weights=None): (2)
L685 a, bins=None, range=None, density=None, weights=None): (1)
L684 def _histogram_dispatcher( (1)
L689 @array_function_dispatch(_histogram_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L690 def histogram(a, bins=10, range=None, density=None, weights=None): (2)
L906 def _histogramdd_dispatcher(sample, bins=None, range=None, density=None, (2)
L907 weights=None): (1)
L917 @array_function_dispatch(_histogramdd_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L918 def histogramdd(sample, bins=10, range=None, density=None, weights=None): (2)
_nanfunctions_impl.py (2)
L28 from numpy.lib._function_base_impl import _weights_are_valid (1)
L29 from numpy._core import overrides (1)
L32 array_function_dispatch = functools.partial( (2)
L33 overrides.array_function_dispatch, module='numpy') (1)
L36 __all__ = [ (1)
L43 def _nan_mask(a, out=None): (1)
L70 def _replace_nan(a, val): (1)
L115 def _copyto(a, val, mask): (1)
L144 def _remove_nan_1d(arr1d, second_arr1d=None, overwrite_input=False): (1)
L204 def _divide_by_count(a, b, out=None): (1)
L248 def _nanmin_dispatcher(a, axis=None, out=None, keepdims=None, (2)
L249 initial=None, where=None): (1)
L253 @array_function_dispatch(_nanmin_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L254 def nanmin(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, (3)
L255 where=np._NoValue): (1)
L378 def _nanmax_dispatcher(a, axis=None, out=None, keepdims=None, (2)
L379 initial=None, where=None): (1)
L383 @array_function_dispatch(_nanmax_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L384 def nanmax(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, (3)
L385 where=np._NoValue): (1)
L507 def _nanargmin_dispatcher(a, axis=None, out=None, *, keepdims=None): (1)
L511 @array_function_dispatch(_nanargmin_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L512 def nanargmin(a, axis=None, out=None, *, keepdims=np._NoValue): (2)
L568 def _nanargmax_dispatcher(a, axis=None, out=None, *, keepdims=None): (1)
L572 @array_function_dispatch(_nanargmax_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L573 def nanargmax(a, axis=None, out=None, *, keepdims=np._NoValue): (2)
L630 def _nansum_dispatcher(a, axis=None, dtype=None, out=None, keepdims=None, (2)
L631 initial=None, where=None): (1)
L635 @array_function_dispatch(_nansum_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L636 def nansum(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, (3)
L637 initial=np._NoValue, where=np._NoValue): (1)
L732 def _nanprod_dispatcher(a, axis=None, dtype=None, out=None, keepdims=None, (2)
L733 initial=None, where=None): (1)
L737 @array_function_dispatch(_nanprod_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L738 def nanprod(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, (3)
L739 initial=np._NoValue, where=np._NoValue): (1)
L814 def _nancumsum_dispatcher(a, axis=None, dtype=None, out=None): (1)
L818 @array_function_dispatch(_nancumsum_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L819 def nancumsum(a, axis=None, dtype=None, out=None): (2)
L883 def _nancumprod_dispatcher(a, axis=None, dtype=None, out=None): (1)
L887 @array_function_dispatch(_nancumprod_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L888 def nancumprod(a, axis=None, dtype=None, out=None): (2)
L949 def _nanmean_dispatcher(a, axis=None, dtype=None, out=None, keepdims=None, (2)
L950 *, where=None): (1)
L954 @array_function_dispatch(_nanmean_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L955 def nanmean(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, (3)
L956 *, where=np._NoValue): (1)
L1059 def _nanmedian1d(arr1d, overwrite_input=False): (1)
L1076 def _nanmedian(a, axis=None, out=None, overwrite_input=False): (1)
L1102 def _nanmedian_small(a, axis=None, out=None, overwrite_input=False): (1)
L1123 a, axis=None, out=None, overwrite_input=None, keepdims=None): (1)
L1122 def _nanmedian_dispatcher( (1)
L1127 @array_function_dispatch(_nanmedian_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1128 def nanmedian(a, axis=None, out=None, overwrite_input=False, keepdims=np._NoValue): (2)
L1223 a, q, axis=None, out=None, overwrite_input=None, (1)
L1224 method=None, keepdims=None, *, weights=None, interpolation=None): (2)
L1222 def _nanpercentile_dispatcher( (2)
L1228 @array_function_dispatch(_nanpercentile_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1232 axis=None, (1)
L1233 out=None, (1)
L1234 overwrite_input=False, (1)
L1235 method="linear", (1)
L1236 keepdims=np._NoValue, (1)
L1229 def nanpercentile( (3)
L1238 weights=None, (1)
L1239 interpolation=None, (1)
L1413 def _nanquantile_dispatcher(a, q, axis=None, out=None, overwrite_input=None, (3)
L1414 method=None, keepdims=None, *, weights=None, (2)
L1415 interpolation=None): (1)
L1419 @array_function_dispatch(_nanquantile_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1423 axis=None, (1)
L1424 out=None, (1)
L1425 overwrite_input=False, (1)
L1426 method="linear", (1)
L1427 keepdims=np._NoValue, (1)
L1420 def nanquantile( (3)
L1429 weights=None, (1)
L1430 interpolation=None, (1)
L1608 axis=None, (1)
L1609 out=None, (1)
L1610 overwrite_input=False, (1)
L1611 method="linear", (1)
L1612 keepdims=np._NoValue, (1)
L1613 weights=None, (1)
L1605 def _nanquantile_unchecked( (1)
L1635 axis: int | None = None, (2)
L1636 out=None, (1)
L1637 overwrite_input: bool = False, (2)
L1638 method="linear", (1)
L1631 def _nanquantile_ureduce_func( (6)
L1632 a: np.array, (1)
L1633 q: np.array, (1)
L1634 weights: np.array, (1)
L1687 arr1d, q, overwrite_input=False, method="linear", weights=None, (1)
L1686 def _nanquantile_1d( (1)
L1709 def _nanvar_dispatcher(a, axis=None, dtype=None, out=None, ddof=None, (3)
L1710 keepdims=None, *, where=None, mean=None, (2)
L1711 correction=None): (1)
L1715 @array_function_dispatch(_nanvar_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1716 def nanvar(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue, (3)
L1717 *, where=np._NoValue, mean=np._NoValue, correction=np._NoValue): (1)
L1899 def _nanstd_dispatcher(a, axis=None, dtype=None, out=None, ddof=None, (3)
L1900 keepdims=None, *, where=None, mean=None, (2)
L1901 correction=None): (1)
L1905 @array_function_dispatch(_nanstd_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (7)
L85 if args[i][:1] in ['', '.']: (6)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1906 def nanstd(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue, (3)
L1907 *, where=np._NoValue, mean=np._NoValue, correction=np._NoValue): (1)
_shape_base_impl.py (2)
L10 from numpy._core import vstack, atleast_3d (1)
L11 from numpy._core.numeric import normalize_axis_tuple (1)
L12 from numpy._core.overrides import set_module (1)
L13 from numpy._core.shape_base import _arrays_for_stack_dispatcher (1)
L14 from numpy.lib._index_tricks_impl import ndindex (1)
L15 from numpy.matrixlib.defmatrix import matrix # this raises all the right alarm bells (1)
L18 __all__ = [ (1)
L26 array_function_dispatch = functools.partial( (2)
L27 overrides.array_function_dispatch, module='numpy') (1)
L30 def _make_along_axis_idx(arr_shape, indices, axis): (1)
L53 def _take_along_axis_dispatcher(arr, indices, axis): (1)
L57 @array_function_dispatch(_take_along_axis_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L58 def take_along_axis(arr, indices, axis): (2)
L178 def _put_along_axis_dispatcher(arr, indices, values, axis): (1)
L182 @array_function_dispatch(_put_along_axis_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L183 def put_along_axis(arr, indices, values, axis): (2)
L270 def _apply_along_axis_dispatcher(func1d, axis, arr, *args, **kwargs): (1)
L274 @array_function_dispatch(_apply_along_axis_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L89 varargs = co.co_varnames[nargs] (1)
L90 nargs = nargs + 1 (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L93 varkw = co.co_varnames[nargs] (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L275 def apply_along_axis(func1d, axis, arr, *args, **kwargs): (2)
L415 def _apply_over_axes_dispatcher(func, a, axes): (1)
L419 @array_function_dispatch(_apply_over_axes_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L420 def apply_over_axes(func, a, axes): (2)
L507 def _expand_dims_dispatcher(a, axis): (1)
L511 @array_function_dispatch(_expand_dims_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L512 def expand_dims(a, axis): (2)
L602 @set_module("numpy") (2)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L603 def row_stack(tup, *, dtype=None, casting="same_kind"): (2)
L614 row_stack.__doc__ = vstack.__doc__ (1)
L617 def _column_stack_dispatcher(tup): (1)
L621 @array_function_dispatch(_column_stack_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L622 def column_stack(tup): (2)
L665 def _dstack_dispatcher(tup): (1)
L669 @array_function_dispatch(_dstack_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L670 def dstack(tup): (2)
L729 def _replace_zero_by_x_arrays(sub_arys): (1)
L738 def _array_split_dispatcher(ary, indices_or_sections, axis=None): (1)
L742 @array_function_dispatch(_array_split_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L743 def array_split(ary, indices_or_sections, axis=0): (2)
L799 def _split_dispatcher(ary, indices_or_sections, axis=None): (1)
L803 @array_function_dispatch(_split_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L804 def split(ary, indices_or_sections, axis=0): (2)
L882 def _hvdsplit_dispatcher(ary, indices_or_sections): (1)
L886 @array_function_dispatch(_hvdsplit_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L887 def hsplit(ary, indices_or_sections): (2)
L957 @array_function_dispatch(_hvdsplit_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L958 def vsplit(ary, indices_or_sections): (2)
L1011 @array_function_dispatch(_hvdsplit_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1012 def dsplit(ary, indices_or_sections): (2)
L1057 def get_array_wrap(*args): (1)
L1081 def _kron_dispatcher(a, b): (1)
L1085 @array_function_dispatch(_kron_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1086 def kron(a, b): (2)
L1200 def _tile_dispatcher(A, reps): (1)
L1204 @array_function_dispatch(_tile_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1205 def tile(A, reps): (2)
_arraysetops_impl.py (1)
L23 from numpy._core._multiarray_umath import _array_converter (1)
L26 array_function_dispatch = functools.partial( (2)
L27 overrides.array_function_dispatch, module='numpy') (1)
L30 __all__ = [ (1)
L37 def _ediff1d_dispatcher(ary, to_end=None, to_begin=None): (1)
L41 @array_function_dispatch(_ediff1d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L42 def ediff1d(ary, to_end=None, to_begin=None): (2)
L132 def _unpack_tuple(x): (1)
L140 def _unique_dispatcher(ar, return_index=None, return_inverse=None, (3)
L141 return_counts=None, axis=None, *, equal_nan=None): (2)
L145 @array_function_dispatch(_unique_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (6)
L85 if args[i][:1] in ['', '.']: (5)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L146 def unique(ar, return_index=False, return_inverse=False, (4)
L147 return_counts=False, axis=None, *, equal_nan=True): (2)
L339 def _unique1d(ar, return_index=False, return_inverse=False, (3)
L340 return_counts=False, *, equal_nan=True, inverse_shape=None, (2)
L341 axis=None): (1)
L387 class UniqueAllResult(NamedTuple): (2)
typing.py (1)
L3113 assert NamedTuple in bases (1)
L3114 return (_NamedTuple,) (1)
L388 values: np.ndarray (1)
L389 indices: np.ndarray (1)
L390 inverse_indices: np.ndarray (1)
L391 counts: np.ndarray (1)
typing.py (1)
L2999 assert _NamedTuple in bases (1)
L3000 for base in bases: (2)
L3001 if base is not _NamedTuple and base is not Generic: (1)
L3004 bases = tuple(tuple if base is _NamedTuple else base for base in bases) (3)
L3005 types = ns.get('__annotations__', {}) (1)
L3006 default_names = [] (1)
L3007 for field_name in types: (5)
L3008 if field_name in ns: (4)
L3010 elif default_names: (4)
L3015 nm_tpl = _make_nmtuple(typename, types.items(), (2)
L3016 defaults=[ns[n] for n in default_names], (1)
L3017 module=ns['__module__']) (1)
L2980 fields = [n for n, t in types] (5)
L2982 for n, t in types} (6)
L2981 types = {n: _type_check(t, f"field {n} annotation must be a type") (6)
L185 invalid_generic_forms = (Generic, Protocol) (4)
L186 if not allow_special_forms: (4)
L187 invalid_generic_forms += (ClassVar,) (4)
L188 if is_argument: (4)
L189 invalid_generic_forms += (Final,) (4)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (4)
L166 if arg is None: (4)
L168 if isinstance(arg, str): (4)
L170 return arg (4)
L192 if (isinstance(arg, _GenericAlias) and (4)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (4)
L197 if allow_special_forms and arg in (ClassVar, Final): (4)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (4)
L201 if type(arg) is tuple: (4)
L203 return arg (4)
L2983 nm_tpl = collections.namedtuple(name, fields, (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (6)
L400 if type(name) is not str: (5)
L402 if not name.isidentifier(): (5)
L405 if _iskeyword(name): (5)
L409 seen = set() (1)
L410 for name in field_names: (5)
L411 if name.startswith('_') and not rename: (4)
L414 if name in seen: (4)
L416 seen.add(name) (4)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L420 defaults = tuple(defaults) (1)
L421 if len(defaults) > len(field_names): (1)
L423 field_defaults = dict(reversed(list(zip(reversed(field_names), (2)
L424 reversed(defaults))))) (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (6)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L448 __new__.__defaults__ = defaults (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (5)
L509 doc = _sys.intern(f'Alias for field number {index}') (4)
L510 class_namespace[name] = _tuplegetter(index, doc) (4)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L2984 defaults=defaults, module=module) (1)
L2985 nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = types (1)
L2986 return nm_tpl (1)
L3018 nm_tpl.__bases__ = bases (1)
L3019 if Generic in bases: (1)
L3023 for key, val in ns.items(): (7)
L3024 if key in _prohibited: (6)
L3026 elif key not in _special: (6)
L3027 if key not in nm_tpl._fields: (4)
L3028 setattr(nm_tpl, key, val) (4)
L3029 try: (4)
L3030 set_name = type(val).__set_name__ (4)
L3031 except AttributeError: (4)
L3032 pass (4)
L3043 if Generic in bases: (1)
L3045 return nm_tpl (1)
L394 class UniqueCountsResult(NamedTuple): (2)
typing.py (1)
L3113 assert NamedTuple in bases (1)
L3114 return (_NamedTuple,) (1)
L395 values: np.ndarray (1)
L396 counts: np.ndarray (1)
typing.py (1)
L2999 assert _NamedTuple in bases (1)
L3000 for base in bases: (2)
L3001 if base is not _NamedTuple and base is not Generic: (1)
L3004 bases = tuple(tuple if base is _NamedTuple else base for base in bases) (3)
L3005 types = ns.get('__annotations__', {}) (1)
L3006 default_names = [] (1)
L3007 for field_name in types: (3)
L3008 if field_name in ns: (2)
L3010 elif default_names: (2)
L3015 nm_tpl = _make_nmtuple(typename, types.items(), (2)
L3016 defaults=[ns[n] for n in default_names], (1)
L3017 module=ns['__module__']) (1)
L2980 fields = [n for n, t in types] (3)
L2982 for n, t in types} (4)
L2981 types = {n: _type_check(t, f"field {n} annotation must be a type") (4)
L185 invalid_generic_forms = (Generic, Protocol) (2)
L186 if not allow_special_forms: (2)
L187 invalid_generic_forms += (ClassVar,) (2)
L188 if is_argument: (2)
L189 invalid_generic_forms += (Final,) (2)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (2)
L166 if arg is None: (2)
L168 if isinstance(arg, str): (2)
L170 return arg (2)
L192 if (isinstance(arg, _GenericAlias) and (2)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (2)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L2983 nm_tpl = collections.namedtuple(name, fields, (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (4)
L400 if type(name) is not str: (3)
L402 if not name.isidentifier(): (3)
L405 if _iskeyword(name): (3)
L409 seen = set() (1)
L410 for name in field_names: (3)
L411 if name.startswith('_') and not rename: (2)
L414 if name in seen: (2)
L416 seen.add(name) (2)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L420 defaults = tuple(defaults) (1)
L421 if len(defaults) > len(field_names): (1)
L423 field_defaults = dict(reversed(list(zip(reversed(field_names), (2)
L424 reversed(defaults))))) (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (4)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L448 __new__.__defaults__ = defaults (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (3)
L509 doc = _sys.intern(f'Alias for field number {index}') (2)
L510 class_namespace[name] = _tuplegetter(index, doc) (2)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L2984 defaults=defaults, module=module) (1)
L2985 nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = types (1)
L2986 return nm_tpl (1)
L3018 nm_tpl.__bases__ = bases (1)
L3019 if Generic in bases: (1)
L3023 for key, val in ns.items(): (7)
L3024 if key in _prohibited: (6)
L3026 elif key not in _special: (6)
L3027 if key not in nm_tpl._fields: (4)
L3028 setattr(nm_tpl, key, val) (4)
L3029 try: (4)
L3030 set_name = type(val).__set_name__ (4)
L3031 except AttributeError: (4)
L3032 pass (4)
L3043 if Generic in bases: (1)
L3045 return nm_tpl (1)
L399 class UniqueInverseResult(NamedTuple): (2)
typing.py (1)
L3113 assert NamedTuple in bases (1)
L3114 return (_NamedTuple,) (1)
L400 values: np.ndarray (1)
L401 inverse_indices: np.ndarray (1)
typing.py (1)
L2999 assert _NamedTuple in bases (1)
L3000 for base in bases: (2)
L3001 if base is not _NamedTuple and base is not Generic: (1)
L3004 bases = tuple(tuple if base is _NamedTuple else base for base in bases) (3)
L3005 types = ns.get('__annotations__', {}) (1)
L3006 default_names = [] (1)
L3007 for field_name in types: (3)
L3008 if field_name in ns: (2)
L3010 elif default_names: (2)
L3015 nm_tpl = _make_nmtuple(typename, types.items(), (2)
L3016 defaults=[ns[n] for n in default_names], (1)
L3017 module=ns['__module__']) (1)
L2980 fields = [n for n, t in types] (3)
L2982 for n, t in types} (4)
L2981 types = {n: _type_check(t, f"field {n} annotation must be a type") (4)
L185 invalid_generic_forms = (Generic, Protocol) (2)
L186 if not allow_special_forms: (2)
L187 invalid_generic_forms += (ClassVar,) (2)
L188 if is_argument: (2)
L189 invalid_generic_forms += (Final,) (2)
L191 arg = _type_convert(arg, module=module, allow_special_forms=allow_special_forms) (2)
L166 if arg is None: (2)
L168 if isinstance(arg, str): (2)
L170 return arg (2)
L192 if (isinstance(arg, _GenericAlias) and (2)
L195 if arg in (Any, LiteralString, NoReturn, Never, Self, TypeAlias): (2)
L197 if allow_special_forms and arg in (ClassVar, Final): (2)
L199 if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol): (2)
L201 if type(arg) is tuple: (2)
L203 return arg (2)
L2983 nm_tpl = collections.namedtuple(name, fields, (2)
__init__.py (1)
L384 if isinstance(field_names, str): (1)
L386 field_names = list(map(str, field_names)) (1)
L387 typename = _sys.intern(str(typename)) (1)
L389 if rename: (1)
L399 for name in [typename] + field_names: (4)
L400 if type(name) is not str: (3)
L402 if not name.isidentifier(): (3)
L405 if _iskeyword(name): (3)
L409 seen = set() (1)
L410 for name in field_names: (3)
L411 if name.startswith('_') and not rename: (2)
L414 if name in seen: (2)
L416 seen.add(name) (2)
L418 field_defaults = {} (1)
L419 if defaults is not None: (1)
L420 defaults = tuple(defaults) (1)
L421 if len(defaults) > len(field_names): (1)
L423 field_defaults = dict(reversed(list(zip(reversed(field_names), (2)
L424 reversed(defaults))))) (1)
L427 field_names = tuple(map(_sys.intern, field_names)) (1)
L428 num_fields = len(field_names) (1)
L429 arg_list = ', '.join(field_names) (1)
L430 if num_fields == 1: (1)
L432 repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' (4)
L433 tuple_new = tuple.__new__ (1)
L434 _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip (1)
L439 '_tuple_new': tuple_new, (1)
L440 '__builtins__': {}, (1)
L441 '__name__': f'namedtuple_{typename}', (1)
L438 namespace = { (1)
L443 code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' (1)
L444 __new__ = eval(code, namespace) (1)
L445 __new__.__name__ = '__new__' (1)
L446 __new__.__doc__ = f'Create new instance of {typename}({arg_list})' (1)
L447 if defaults is not None: (1)
L448 __new__.__defaults__ = defaults (1)
L450 @classmethod (2)
L451 def _make(cls, iterable): (2)
L457 _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' (1)
L460 def _replace(self, /, **kwds): (1)
L466 _replace.__doc__ = (f'Return a new {typename} object replacing specified ' (1)
L469 def __repr__(self): (1)
L473 def _asdict(self): (1)
L477 def __getnewargs__(self): (1)
L483 __new__, (1)
L484 _make.__func__, (1)
L485 _replace, (1)
L486 __repr__, (1)
L487 _asdict, (1)
L488 __getnewargs__, (1)
L482 for method in ( (7)
L490 method.__qualname__ = f'{typename}.{method.__name__}' (6)
L495 '__doc__': f'{typename}({arg_list})', (1)
L496 '__slots__': (), (1)
L497 '_fields': field_names, (1)
L498 '_field_defaults': field_defaults, (1)
L499 '__new__': __new__, (1)
L500 '_make': _make, (1)
L501 '__replace__': _replace, (1)
L502 '_replace': _replace, (1)
L503 '__repr__': __repr__, (1)
L504 '_asdict': _asdict, (1)
L505 '__getnewargs__': __getnewargs__, (1)
L506 '__match_args__': field_names, (1)
L494 class_namespace = { (1)
L508 for index, name in enumerate(field_names): (3)
L509 doc = _sys.intern(f'Alias for field number {index}') (2)
L510 class_namespace[name] = _tuplegetter(index, doc) (2)
L512 result = type(typename, (tuple,), class_namespace) (1)
L519 if module is None: (1)
L527 if module is not None: (1)
L528 result.__module__ = module (1)
L530 return result (1)
L2984 defaults=defaults, module=module) (1)
L2985 nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = types (1)
L2986 return nm_tpl (1)
L3018 nm_tpl.__bases__ = bases (1)
L3019 if Generic in bases: (1)
L3023 for key, val in ns.items(): (7)
L3024 if key in _prohibited: (6)
L3026 elif key not in _special: (6)
L3027 if key not in nm_tpl._fields: (4)
L3028 setattr(nm_tpl, key, val) (4)
L3029 try: (4)
L3030 set_name = type(val).__set_name__ (4)
L3031 except AttributeError: (4)
L3032 pass (4)
L3043 if Generic in bases: (1)
L3045 return nm_tpl (1)
L404 def _unique_all_dispatcher(x, /): (1)
L408 @array_function_dispatch(_unique_all_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L409 def unique_all(x): (2)
L464 def _unique_counts_dispatcher(x, /): (1)
L468 @array_function_dispatch(_unique_counts_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L469 def unique_counts(x): (2)
L516 def _unique_inverse_dispatcher(x, /): (1)
L520 @array_function_dispatch(_unique_inverse_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L521 def unique_inverse(x): (2)
L569 def _unique_values_dispatcher(x, /): (1)
L573 @array_function_dispatch(_unique_values_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L574 def unique_values(x): (2)
L613 ar1, ar2, assume_unique=None, return_indices=None): (1)
L612 def _intersect1d_dispatcher( (1)
L617 @array_function_dispatch(_intersect1d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L618 def intersect1d(ar1, ar2, assume_unique=False, return_indices=False): (2)
L709 def _setxor1d_dispatcher(ar1, ar2, assume_unique=None): (1)
L713 @array_function_dispatch(_setxor1d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L714 def setxor1d(ar1, ar2, assume_unique=False): (2)
L757 def _in1d_dispatcher(ar1, ar2, assume_unique=None, invert=None, *, (2)
L758 kind=None): (1)
L762 @array_function_dispatch(_in1d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L763 def in1d(ar1, ar2, assume_unique=False, invert=False, *, kind=None): (2)
L862 def _in1d(ar1, ar2, assume_unique=False, invert=False, *, kind=None): (1)
L1010 def _isin_dispatcher(element, test_elements, assume_unique=None, invert=None, (2)
L1011 *, kind=None): (1)
L1015 @array_function_dispatch(_isin_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (5)
L85 if args[i][:1] in ['', '.']: (4)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1016 def isin(element, test_elements, assume_unique=False, invert=False, *, (3)
L1017 kind=None): (1)
L1136 def _union1d_dispatcher(ar1, ar2): (1)
L1140 @array_function_dispatch(_union1d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1141 def union1d(ar1, ar2): (2)
L1173 def _setdiff1d_dispatcher(ar1, ar2, assume_unique=None): (1)
L1177 @array_function_dispatch(_setdiff1d_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L1178 def setdiff1d(ar1, ar2, assume_unique=False): (2)
_polynomial_impl.py (4)
L14 import numpy._core.numeric as NX (1)
L18 from numpy._core import overrides (1)
L19 from numpy.exceptions import RankWarning (1)
L20 from numpy.lib._twodim_base_impl import diag, vander (1)
L21 from numpy.lib._function_base_impl import trim_zeros (1)
L22 from numpy.lib._type_check_impl import iscomplex, real, imag, mintypecode (1)
L23 from numpy.linalg import eigvals, lstsq, inv (1)
L26 array_function_dispatch = functools.partial( (2)
L27 overrides.array_function_dispatch, module='numpy') (1)
L30 def _poly_dispatcher(seq_of_zeros): (1)
L34 @array_function_dispatch(_poly_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L35 def poly(seq_of_zeros): (2)
L159 def _roots_dispatcher(p): (1)
L163 @array_function_dispatch(_roots_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (2)
L85 if args[i][:1] in ['', '.']: (1)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L164 def roots(p): (2)
L256 def _polyint_dispatcher(p, m=None, k=None): (1)
L260 @array_function_dispatch(_polyint_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (4)
L85 if args[i][:1] in ['', '.']: (3)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L261 def polyint(p, m=1, k=None): (2)
L363 def _polyder_dispatcher(p, m=None): (1)
L367 @array_function_dispatch(_polyder_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L368 def polyder(p, m=1): (2)
L445 def _polyfit_dispatcher(x, y, deg, rcond=None, full=None, w=None, cov=None): (1)
L449 @array_function_dispatch(_polyfit_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (8)
L85 if args[i][:1] in ['', '.']: (7)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L94 len(implementation_spec.defaults) != (2)
L95 len(dispatcher_spec.defaults))): (1)
L99 if implementation_spec.defaults is not None: (1)
L100 if dispatcher_spec.defaults != (None,) * len(dispatcher_spec.defaults): (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L450 def polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False): (2)
L698 def _polyval_dispatcher(p, x): (1)
L702 @array_function_dispatch(_polyval_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L703 def polyval(p, x): (2)
L782 def _binary_op_dispatcher(a1, a2): (1)
L786 @array_function_dispatch(_binary_op_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L787 def polyadd(a1, a2): (2)
L855 @array_function_dispatch(_binary_op_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L856 def polysub(a1, a2): (2)
L911 @array_function_dispatch(_binary_op_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L912 def polymul(a1, a2): (2)
L975 def _polydiv_dispatcher(u, v): (1)
L979 @array_function_dispatch(_polydiv_dispatcher) (2)
overrides.py (2)
L142 def decorator(implementation): (1)
L170 return decorator (1)
L143 if verify: (1)
L144 if dispatcher is not None: (1)
L145 verify_matching_signatures(implementation, dispatcher) (1)
L85 implementation_spec = ArgSpec(*getargspec(implementation)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L86 dispatcher_spec = ArgSpec(*getargspec(dispatcher)) (1)
_inspect.py (1)
L106 if ismethod(func): (1)
L24 return isinstance(object, types.MethodType) (1)
L108 if not isfunction(func): (1)
L39 return isinstance(object, types.FunctionType) (1)
L110 args, varargs, varkw = getargs(func.__code__) (1)
L74 if not iscode(co): (1)
L59 return isinstance(object, types.CodeType) (1)
L77 nargs = co.co_argcount (1)
L78 names = co.co_varnames (1)
L79 args = list(names[:nargs]) (1)
L84 for i in range(nargs): (3)
L85 if args[i][:1] in ['', '.']: (2)
L87 varargs = None (1)
L88 if co.co_flags & CO_VARARGS: (1)
L91 varkw = None (1)
L92 if co.co_flags & CO_VARKEYWORDS: (1)
L94 return args, varargs, varkw (1)
L111 return args, varargs, varkw, func.__defaults__ (1)
L88 if (implementation_spec.args != dispatcher_spec.args or (1)
L89 implementation_spec.varargs != dispatcher_spec.varargs or (1)
L90 implementation_spec.keywords != dispatcher_spec.keywords or (1)
L91 (bool(implementation_spec.defaults) != (2)
L92 bool(dispatcher_spec.defaults)) or (1)
L93 (implementation_spec.defaults is not None and (1)
L99 if implementation_spec.defaults is not None: (1)
L157 if docs_from_dispatcher: (1)
L160 public_api = _ArrayFunctionDispatcher(dispatcher, implementation) (1)
L161 public_api = functools.wraps(implementation)(public_api) (1)
functools.py (1)
L77 return partial(update_wrapper, wrapped=wrapped, (2)
L78 assigned=assigned, updated=updated) (1)
L51 for attr in assigned: (7)
L52 try: (6)
L53 value = getattr(wrapped, attr) (6)
L57 setattr(wrapper, attr, value) (6)
L58 for attr in updated: (2)
L59 getattr(wrapper, attr).update(getattr(wrapped, attr, {})) (1)
L62 wrapper.__wrapped__ = wrapped (1)
L64 return wrapper (1)
L163 if module is not None: (1)
L164 public_api.__module__ = module (1)
L166 ARRAY_FUNCTIONS.add(public_api) (1)
L168 return public_api (1)
L980 def polydiv(u, v): (2)
L1052 _poly_mat = re.compile(r"\*\*([0-9]*)") (1)
__init__.py (1)
L289 return _compile(pattern, flags) (1)
L332 if isinstance(flags, RegexFlag): (1)
L334 try: (1)
L335 return _cache2[type(pattern), pattern, flags] (1)
L336 except KeyError: (1)
L337 pass (1)
L339 key = (type(pattern), pattern, flags) (1)
L341 p = _cache.pop(key, None) (1)
L342 if p is None: (1)
L343 if isinstance(pattern, Pattern): (1)
L348 if not _compiler.isstring(pattern): (1)
_compiler.py (1)
L574 return isinstance(obj, (str, bytes)) (1)
L350 p = _compiler.compile(pattern, flags) (1)
_compiler.py (1)
L746 if isstring(p): (1)
L574 return isinstance(obj, (str, bytes)) (1)
L747 pattern = p (1)
L748 p = _parser.parse(p, flags) (1)
_parser.py (1)
L973 source = Tokenizer(str) (1)
L231 self.istext = isinstance(string, str) (1)
L232 self.string = string (1)
L233 if not self.istext: (1)
L235 self.decoded_string = string (1)
L236 self.index = 0 (1)
L237 self.next = None (1)
L238 self.__next() (1)
L240 index = self.index (11)
L241 try: (11)
L242 char = self.decoded_string[index] (11)
L246 if char == "\\": (10)
L247 index += 1 (2)
L248 try: (2)
L249 char += self.decoded_string[index] (2)
L253 self.index = index + 1 (10)
L254 self.next = char (10)
L975 if state is None: (1)
L976 state = State() (1)
L77 self.flags = 0 (1)
L78 self.groupdict = {} (1)
L79 self.groupwidths = [None] # group 0 (1)
L80 self.lookbehindgroups = None (1)
L81 self.grouprefpos = {} (1)
L977 state.flags = flags (1)
L978 state.str = str (1)
L980 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) (1)
L454 items = [] (2)
L455 itemsappend = items.append (2)
L456 sourcematch = source.match (2)
L457 start = source.tell() (2)
L293 return self.index - len(self.next or '') (5)
L458 while True: (2)
L459 itemsappend(_parse(source, state, verbose, nested + 1, (4)
L460 not nested and not items)) (2)
L513 subpattern = SubPattern(state) (2)
L113 self.state = state (3)
L114 if data is None: (3)
L115 data = [] (2)
L116 self.data = data (3)
L117 self.width = None (3)
L516 subpatternappend = subpattern.append (2)
L517 sourceget = source.get (2)
L518 sourcematch = source.match (2)
L519 _len = len (2)
L520 _ord = ord (2)
L522 while True: (7)
L524 this = source.next (7)
L525 if this is None: (7)
L527 if this in "|)": (6)
L529 sourceget() (5)
L261 this = self.next (8)
L262 self.__next() (8)
L263 return this (8)
L531 if verbose: (5)
L542 if this[0] == "\\": (5)
L543 code = _escape(source, this, state) (2)
L373 code = CATEGORIES.get(escape) (2)
L374 if code: (2)
L376 code = ESCAPES.get(escape) (2)
L377 if code: (2)
L379 try: (2)
L380 c = escape[1:2] (2)
L381 if c == "x": (2)
L387 elif c == "u" and source.istext: (2)
L393 elif c == "U" and source.istext: (2)
L401 elif c == "N" and source.istext: (2)
L413 elif c == "0": (2)
L417 elif c in DIGITS: (2)
L440 if len(escape) == 2: (2)
L441 if c in ASCIILETTERS: (2)
L443 return LITERAL, ord(escape[1]) (2)
L544 subpatternappend(code) (2)
L176 self.data.append(code) (4)
L546 elif this not in SPECIAL_CHARS: (3)
L549 elif this == "[": (3)
L638 elif this in REPEAT_CHARS: (2)
L705 elif this == ".": (1)
L708 elif this == "(": (1)
L709 start = source.tell() - 1 (1)
L710 capture = True (1)
L711 atomic = False (1)
L712 name = None (1)
L713 add_flags = 0 (1)
L714 del_flags = 0 (1)
L715 if sourcematch("?"): (1)
L256 if char == self.next: (8)
L259 return False (6)
L854 if capture: (1)
L855 try: (1)
L856 group = state.opengroup(name) (1)
L86 gid = self.groups (1)
L84 return len(self.groupwidths) (2)
L87 self.groupwidths.append(None) (1)
L88 if self.groups > MAXGROUPS: (1)
L90 if name is not None: (1)
L96 return gid (1)
L861 sub_verbose = ((verbose or (add_flags & SRE_FLAG_VERBOSE)) and (1)
L863 p = _parse_sub(source, state, sub_verbose, nested + 1) (1)
L550 here = source.tell() - 1 (1)
L552 set = [] (1)
L553 setappend = set.append (1)
L556 if source.next == '[': (1)
L562 negate = sourcematch("^") (1)
L564 while True: (2)
L565 this = sourceget() (2)
L566 if this is None: (2)
L569 if this == "]" and set: (2)
L571 elif this[0] == "\\": (1)
L574 if set and this in '-&~|' and source.next == this: (1)
L585 code1 = LITERAL, _ord(this) (1)
L586 if sourcematch("-"): (1)
L257 self.__next() (2)
L258 return True (2)
L588 that = sourceget() (1)
L589 if that is None: (1)
L592 if that == "]": (1)
L598 if that[0] == "\\": (1)
L601 if that == '-': (1)
L608 code2 = LITERAL, _ord(that) (1)
L609 if code1[0] != LITERAL or code2[0] != LITERAL: (1)
L612 lo = code1[1] (1)
L613 hi = code2[1] (1)
L614 if hi < lo: (1)
L617 setappend((RANGE, (lo, hi))) (1)
L570 break (1)
L623 set = _uniq(set) (1)
L449 return list(dict.fromkeys(items)) (1)
L625 if _len(set) == 1 and set[0][0] is LITERAL: (1)
L632 if negate: (1)
L636 subpatternappend((IN, set)) (1)
L640 here = source.tell() (1)
L641 if this == "?": (1)
L643 elif this == "*": (1)
L644 min, max = 0, MAXREPEAT (1)
L681 if subpattern: (1)
L164 return len(self.data) (4)
L682 item = subpattern[-1:] (1)
L168 if isinstance(index, slice): (8)
L169 return SubPattern(self.state, self.data[index]) (1)
L685 if not item or item[0][0] is AT: (1)
L170 return self.data[index] (7)
L688 if item[0][0] in _REPEATCODES: (1)
L691 if item[0][0] is SUBPATTERN: (1)
L695 if sourcematch("?"): (1)
L698 elif sourcematch("+"): (1)
L703 subpattern[-1] = (MAX_REPEAT, (min, max, item)) (1)
L172 self.data[index] = code (1)
L528 break # end of subpattern (1)
L885 for i in range(len(subpattern))[::-1]: (6)
L886 op, av = subpattern[i] (4)
L887 if op is SUBPATTERN: (4)
L892 return subpattern (2)
L461 if not sourcematch("|"): (2)
L462 break (2)
L466 if len(items) == 1: (2)
L467 return items[0] (2)
L864 if not source.match(")"): (1)
L243 except IndexError: (1)
L244 self.next = None (1)
L245 return (1)
L867 if group is not None: (1)
L868 state.closegroup(group, p) (1)
L98 self.groupwidths[gid] = p.getwidth() (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (2)
L182 for op, av in self.data: (4)
L183 if op is BRANCH: (2)
L192 elif op is ATOMIC_GROUP: (2)
L196 elif op is SUBPATTERN: (2)
L200 elif op in _REPEATCODES: (2)
L201 i, j = av[2].getwidth() (1)
L207 elif op in _UNITCODES: (1)
L208 lo = lo + 1 (1)
L209 hi = hi + 1 (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (2)
L227 return self.width (2)
L202 lo = lo + i * av[0] (1)
L203 if av[1] == MAXREPEAT and j: (1)
L204 hi = MAXWIDTH (1)
L869 if atomic: (1)
L873 subpatternappend((SUBPATTERN, (group, add_flags, del_flags, p))) (1)
L526 break # end of pattern (1)
L888 group, add_flags, del_flags, p = av (1)
L889 if group is None and not add_flags and not del_flags: (1)
L981 p.state.flags = fix_flags(str, p.state.flags) (1)
L956 if isinstance(src, str): (1)
L957 if flags & SRE_FLAG_LOCALE: (1)
L959 if not flags & SRE_FLAG_ASCII: (1)
L960 flags |= SRE_FLAG_UNICODE (1)
L968 return flags (1)
L983 if source.next is not None: (1)
L987 for g in p.state.grouprefpos: (1)
L992 if flags & SRE_FLAG_DEBUG: (1)
L995 return p (1)
L752 code = _code(p, flags) (1)
L578 flags = p.state.flags | flags (1)
L579 code = [] (1)
L582 _compile_info(code, p, flags) (1)
L518 lo, hi = pattern.getwidth() (1)
_parser.py (1)
L179 if self.width is not None: (2)
L181 lo = hi = 0 (1)
L182 for op, av in self.data: (4)
L183 if op is BRANCH: (3)
L192 elif op is ATOMIC_GROUP: (3)
L196 elif op is SUBPATTERN: (3)
L200 elif op in _REPEATCODES: (2)
L207 elif op in _UNITCODES: (2)
L208 lo = lo + 1 (2)
L209 hi = hi + 1 (2)
L197 i, j = av[-1].getwidth() (1)
L180 return self.width (1)
L198 lo = lo + i (1)
L199 hi = hi + j (1)
L226 self.width = min(lo, MAXWIDTH), min(hi, MAXWIDTH) (1)
L227 return self.width (1)
L519 if hi > MAXCODE: (1)
L520 hi = MAXCODE (1)
L521 if lo == 0: (1)
L525 prefix = [] (1)
L526 prefix_skip = 0 (1)
L527 charset = [] # not used (1)
L528 if not (flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE): (1)
L530 prefix, prefix_skip, got_all = _get_literal_prefix(pattern, flags) (1)
L441 prefix = [] (2)
L442 prefixappend = prefix.append (2)
L443 prefix_skip = None (2)
L444 iscased = _get_iscased(flags) (2)
L432 if not flags & SRE_FLAG_IGNORECASE: (2)
L433 return None (2)
L445 for op, av in pattern.data: (4)
L446 if op is LITERAL: (4)
L447 if iscased and iscased(av): (2)
L449 prefixappend(av) (2)
L450 elif op is SUBPATTERN: (2)
L451 group, add_flags, del_flags, p = av (1)
L452 flags1 = _combine_flags(flags, add_flags, del_flags) (1)
L33 if add_flags & TYPE_FLAGS: (2)
L35 return (flags | add_flags) & ~del_flags (2)
L453 if flags1 & SRE_FLAG_IGNORECASE and flags1 & SRE_FLAG_LOCALE: (1)
L455 prefix1, prefix_skip1, got_all = _get_literal_prefix(p, flags1) (1)
L465 break (1)
L468 return prefix, prefix_skip, False (2)
L456 if prefix_skip is None: (1)
L457 if group is not None: (1)
L458 prefix_skip = len(prefix) (1)
L461 prefix.extend(prefix1) (1)
L462 if not got_all: (1)
L463 break (1)
L532 if not prefix: (1)
L539 emit = code.append (1)
L540 emit(INFO) (1)
L541 skip = len(code); emit(0) (1)
L543 mask = 0 (1)
L544 if prefix: (1)
L545 mask = SRE_INFO_PREFIX (1)
L546 if prefix_skip is None and got_all: (1)
L550 emit(mask) (1)
L552 if lo < MAXCODE: (1)
L553 emit(lo) (1)
L557 emit(hi) (1)
L559 if prefix: (1)
L560 emit(len(prefix)) # length (1)
L561 if prefix_skip is None: (1)
L563 emit(prefix_skip) # skip (1)
L564 code.extend(prefix) (1)
L566 code.extend(_generate_overlap_table(prefix)) (1)
L419 table = [0] * len(prefix) (1)
L420 for i in range(1, len(prefix)): (2)
L421 idx = table[i - 1] (1)
L422 while prefix[i] != prefix[idx]: (1)
L428 table[i] = idx + 1 (1)
L429 return table (1)
L571 code[skip] = len(code) - skip (1)
L585 _compile(code, p.data, flags) (1)
L39 emit = code.append (3)
L40 _len = len (3)
L41 LITERAL_CODES = _LITERAL_CODES (3)
L42 REPEATING_CODES = _REPEATING_CODES (3)
L43 SUCCESS_CODES = _SUCCESS_CODES (3)
L44 ASSERT_CODES = _ASSERT_CODES (3)
L45 iscased = None (3)
L46 tolower = None (3)
L47 fixes = None (3)
L48 if flags & SRE_FLAG_IGNORECASE and not flags & SRE_FLAG_LOCALE: (3)
L56 for op, av in pattern: (8)
_parser.py (4)
L168 if isinstance(index, slice): (4)
L170 return self.data[index] (4)
L57 if op in LITERAL_CODES: (5)
L58 if not flags & SRE_FLAG_IGNORECASE: (2)
L59 emit(op) (2)
L60 emit(av) (2)
L85 elif op is IN: (3)
L98 elif op is ANY: (2)
L103 elif op in REPEATING_CODES: (2)
L120 elif op is SUBPATTERN: (1)
L121 group, add_flags, del_flags, p = av (1)
L122 if group: (1)
L123 emit(MARK) (1)
L124 emit((group-1)*2) (1)
L126 _compile(code, p, _combine_flags(flags, add_flags, del_flags)) (1)
L104 if _simple(av[2]): (1)
L403 if len(p) != 1: (1)
_parser.py (1)
L164 return len(self.data) (1)
L405 op, av = p[0] (1)
_parser.py (1)
L168 if isinstance(index, slice): (1)
L170 return self.data[index] (1)
L406 if op is SUBPATTERN: (1)
L408 return op in _UNIT_CODES (1)
L105 emit(REPEATING_CODES[op][2]) (1)
L106 skip = _len(code); emit(0) (1)
L107 emit(av[0]) (1)
L108 emit(av[1]) (1)
L109 _compile(code, av[2], flags) (1)
L86 charset, hascased = _optimize_charset(av, iscased, tolower, fixes) (1)
L243 out = [] (1)
L244 tail = [] (1)
L245 charmap = bytearray(256) (1)
L246 hascased = False (1)
L247 for op, av in charset: (2)
L248 while True: (1)
L249 try: (1)
L250 if op is LITERAL: (1)
L261 elif op is RANGE: (1)
L262 r = range(av[0], av[1]+1) (1)
L263 if fixup: # IGNORECASE and not LOCALE (1)
L276 for i in r: (11)
L277 charmap[i] = 1 (10)
L309 break (1)
L312 runs = [] (1)
L313 q = 0 (1)
L314 while True: (2)
L315 p = charmap.find(1, q) (2)
L316 if p < 0: (2)
L318 if len(runs) >= 2: (1)
L321 q = charmap.find(0, p) (1)
L322 if q < 0: (1)
L325 runs.append((p, q)) (1)
L317 break (1)
L326 if runs is not None: (1)
L328 for p, q in runs: (2)
L329 if q - p == 1: (1)
L332 out.append((RANGE, (p, q - 1))) (1)
L333 out += tail (1)
L335 if hascased or len(out) < len(charset): (1)
L338 return charset, hascased (1)
L87 if flags & SRE_FLAG_IGNORECASE and flags & SRE_FLAG_LOCALE: (1)
L89 elif not hascased: (1)
L90 emit(IN) (1)
L95 skip = _len(code); emit(0) (1)
L96 _compile_charset(charset, flags, code) (1)
L216 emit = code.append (1)
L217 for op, av in charset: (2)
L218 emit(op) (1)
L219 if op is NEGATE: (1)
L221 elif op is LITERAL: (1)
L223 elif op is RANGE or op is RANGE_UNI_IGNORE: (1)
L224 emit(av[0]) (1)
L225 emit(av[1]) (1)
L239 emit(FAILURE) (1)
L97 code[skip] = _len(code) - skip (1)
L110 emit(SUCCESS) (1)
L111 code[skip] = _len(code) - skip (1)
L127 if group: (1)
L128 emit(MARK) (1)
L129 emit((group-1)*2+1) (1)
L587 code.append(SUCCESS) (1)
L589 return code (1)
L754 if flags & SRE_FLAG_DEBUG: (1)
L759 groupindex = p.state.groupdict (1)
L760 indexgroup = [None] * p.state.groups (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L761 for k, i in groupindex.items(): (1)
L764 return _sre.compile( (2)
L765 pattern, flags | p.state.flags, code, (1)
L766 p.state.groups-1, (1)
_parser.py (1)
L84 return len(self.groupwidths) (1)
L767 groupindex, tuple(indexgroup) (1)
L351 if flags & DEBUG: (1)
enum.py (1)
L1608 other_value = self._get_value(other) (1)
L1590 if isinstance(flag, self.__class__): (3)
L1592 elif self._member_type_ is not object and isinstance(flag, self._member_type_): (2)
L1593 return flag (2)
L1609 if other_value is NotImplemented: (1)
L1612 for flag in self, other: (3)
L1613 if self._get_value(flag) is None: (2)
L1591 return flag._value_ (1)
L1615 value = self._value_ (1)
L1616 return self.__class__(value & other_value) (1)
L722 if cls._member_map_: (1)
L724 if names is not _not_given: (1)
L726 return cls.__new__(cls, value) (1)
L1160 if type(value) is cls: (1)
L1165 try: (1)
L1166 return cls._value2member_map_[value] (1)
L353 if len(_cache) >= _MAXCACHE: (1)
L363 _cache[key] = p (1)
L365 if len(_cache2) >= _MAXCACHE2: (1)
L371 _cache2[key] = p (1)
L372 return p (1)
L1053 def _raise_power(astr, wrap=70): (1)
L1080 @set_module('numpy') (3)
__init__.py (2)
L27 def decorator(func): (1)
L31 return decorator (1)
L28 if module is not None: (1)
L29 func.__module__ = module (1)
L30 return func (1)
L1081 class poly1d: (2)
L1082 """ (1)
L1189 __hash__ = None (1)
L1191 @property (2)
L1192 def coeffs(self): (2)
L1196 @coeffs.setter (2)
L1197 def coeffs(self, value): (2)
L1202 @property (2)
L1203 def variable(self): (2)
L1208 @property (2)
L1209 def order(self): (2)
L1213 @property (2)
L1214 def roots(self): (2)
L1220 @property (2)
L1221 def _coeffs(self): (2)
L1223 @_coeffs.setter (2)
L1224 def _coeffs(self, coeffs): (2)
L1228 r = roots (1)
L1229 c = coef = coefficients = coeffs (1)
L1230 o = order (1)
L1232 def __init__(self, c_or_r, r=False, variable=None): (1)
L1259 def __array__(self, t=None, copy=None): (1)
L1265 def __repr__(self): (1)
L1270 def __len__(self): (1)
L1273 def __str__(self): (1)
L1330 def __call__(self, val): (1)
L1333 def __neg__(self): (1)
L1336 def __pos__(self): (1)
L1339 def __mul__(self, other): (1)
L1346 def __rmul__(self, other): (1)
L1353 def __add__(self, other): (1)
L1357 def __radd__(self, other): (1)
L1361 def __pow__(self, val): (1)
L1369 def __sub__(self, other): (1)
L1373 def __rsub__(self, other): (1)
L1377 def __div__(self, other): (1)
L1384 __truediv__ = __div__ (1)
L1386 def __rdiv__(self, other): (1)
L1393 __rtruediv__ = __rdiv__ (1)
L1395 def __eq__(self, other): (1)
L1402 def __ne__(self, other): (1)
L1408 def __getitem__(self, val): (1)
L1416 def __setitem__(self, key, val): (1)
L1427 def __iter__(self): (1)
L1430 def integ(self, m=1, k=0): (1)
L1443 def deriv(self, m=1): (1)
L1458 warnings.simplefilter('always', RankWarning) (1)
warnings.py (1)
L180 if action not in {"error", "ignore", "always", "default", "module", "once"}: (1)
L182 if not isinstance(lineno, int): (1)
L184 if lineno < 0: (1)
L186 _add_filter(action, None, category, None, lineno, append=append) (1)
L191 if not append: (1)
L192 try: (1)
L193 filters.remove(item) (1)
L194 except ValueError: (1)
L195 pass (1)
L196 filters.insert(0, item) (1)
L200 _filters_mutated() (1)
_array_api_info.py (1)
L29 class __array_namespace_info__: (2)
L30 """ (1)
L61 __module__ = 'numpy' (1)
L63 def capabilities(self): (1)
L107 def default_device(self): (1)
L134 def default_dtypes(self, *, device=None): (1)
L186 def dtypes(self, *, device=None, kind=None): (1)
L321 def devices(self): (1)
L469 (274)
L470 (274)
L471 (274)
L477 (274)
L1413 (42)
L1414 (42)
L1415 (42)
L1282 (1)
L1324 (1)
L1416 (1)
L1420 (1)
L1421 (1)
L1422 (1)
L1310 (1)
L985 (4)
L664 (4)
L667 (4)
L678 (4)
L679 (4)
L680 (4)
L681 (4)
L502 (4)
L505 (4)
L1018 (4)
L688 (4)
L992 (4)
L995 (4)
L1000 (4)
L1313 (1)
L2 a = -0.0 (1)
L3 anp = np.mean(a) (1)
fromnumeric.py (1)
L3732 return (a, where, out) (1)
L3847 kwargs = {} (1)
L3848 if keepdims is not np._NoValue: (1)
L3850 if where is not np._NoValue: (1)
L3852 if type(a) is not mu.ndarray: (1)
L3853 try: (1)
L3854 mean = a.mean (1)
L3855 except AttributeError: (1)
L3856 pass (1)
L3860 return _methods._mean(a, axis=axis, dtype=dtype, (3)
_methods.py (1)
L119 arr = asanyarray(a) (1)
L121 is_float16_result = False (1)
L123 rcount = _count_reduce_items(arr, axis, keepdims=keepdims, where=where) (1)
L78 if where is True: (1)
L80 if axis is None: (1)
L81 axis = tuple(range(arr.ndim)) (1)
L84 items = 1 (1)
L85 for ax in axis: (1)
L87 items = nt.intp(items) (1)
L97 return items (1)
L124 if rcount == 0 if where is True else umr_any(rcount == 0, axis=None): (1)
L128 if dtype is None: (1)
L129 if issubclass(arr.dtype.type, (nt.integer, nt.bool)): (1)
L131 elif issubclass(arr.dtype.type, nt.float16): (1)
L135 ret = umr_sum(arr, axis, dtype, out, keepdims, where=where) (1)
L136 if isinstance(ret, mu.ndarray): (1)
L141 elif hasattr(ret, 'dtype'): (1)
L142 if is_float16_result: (1)
L145 ret = ret.dtype.type(ret / rcount) (1)
L149 return ret (1)
L3861 out=out, **kwargs) (2)
L4 print(anp) (1)
cp1252.py (1)
L19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] (2)